use cmd.exe as default shell on windows

Mentioned in #12.
This commit is contained in:
Gokcehan committed 2017-08-02 20:08:49 +03:00
1 parent 6631cdb23b
commit eb2710c888
2 files changed
+14 -3

No files matched your search

+5 -1
View File
@@ -140,7 +140,11 @@ func (app *app) runShell(s string, args []string, wait bool, async bool) {
s = fmt.Sprintf("IFS='%s'; %s", gOpts.ifs, s)
}
args = append([]string{"-c", s, "--"}, args...)
if runtime.GOOS == "windows" {
args = append([]string{"/c", s}, args...)
} else {
args = append([]string{"-c", s, "--"}, args...)
}
cmd := exec.Command(gOpts.shell, args...)