This commit is contained in:
josc146 2023-06-07 16:49:31 +08:00
parent 796338a32f
commit dae3f72d04

View File

@ -25,9 +25,11 @@ func Cmd(args ...string) (string, error) {
return "", err return "", err
} }
for _, arg := range args { if strings.Contains(cmdHelper, " ") {
if strings.Contains(arg, " ") && strings.Contains(cmdHelper, " ") { for _, arg := range args {
return "", errors.New("path contains space") // golang bug https://github.com/golang/go/issues/17149#issuecomment-473976818 if strings.Contains(arg, " ") {
return "", errors.New("path contains space") // golang bug https://github.com/golang/go/issues/17149#issuecomment-473976818
}
} }
} }