Allow spaces in Linux volume path names (closes #4442)
Summary
Docker volumes with spaces in paths (e.g., /my host path:/container) fail to parse on Linux with InvalidVolumeSpecError. The Windows parser already allows spaces.
Root cause
The linuxDir regex in linux_parser.go explicitly excluded the space character from the allowed path character class: [^\/:*?"<>|\r\n ]. Any volume spec containing a space in a path component failed to match.
Fix
Removed the space from the exclusion character class in linuxDir, matching the Windows parser behavior. Added 4 test cases for paths with spaces.
// Before: space was excluded alongside other invalid characters
linuxDir = /(?:[^\\/:*?"<>|\r\n ]+/?)*
// After: space removed from exclusion class, matching Windows parser behavior
linuxDir = /(?:[^\\/:*?"<>|\r\n]+/?)*
Verification
- go test ./executors/docker/internal/volumes/parser/... — passes
- go vet ./executors/docker/internal/volumes/parser/... — clean
Edited by Ashmit Sharma