diff --git a/os_windows.go b/os_windows.go index 47968868..9e579c8e 100644 --- a/os_windows.go +++ b/os_windows.go @@ -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 }