Wrap filenames in quotes only for Windows CMD (#1371)
This commit is contained in:
1 parent
b3ac207c34
commit
1c52e3ad68
1 file changed
+5
-1
+5
-1
@@ -180,5 +180,9 @@ func errCrossDevice(err error) bool {
|
||||
}
|
||||
|
||||
func quoteString(s string) string {
|
||||
return fmt.Sprintf(`"%s"`, s)
|
||||
// Windows CMD requires special handling to deal with quoted arguments
|
||||
if strings.ToLower(gOpts.shell) == "cmd" {
|
||||
return fmt.Sprintf(`"%s"`, s)
|
||||
}
|
||||
return s
|
||||
}
|
||||
Reference in new issue
Block a user