diff options
Diffstat (limited to 'vendor/github.com/mattn/go-shellwords/util_posix.go')
-rw-r--r-- | vendor/github.com/mattn/go-shellwords/util_posix.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/mattn/go-shellwords/util_posix.go b/vendor/github.com/mattn/go-shellwords/util_posix.go index 3aef2c4d7..988fc9ed2 100644 --- a/vendor/github.com/mattn/go-shellwords/util_posix.go +++ b/vendor/github.com/mattn/go-shellwords/util_posix.go @@ -1,4 +1,4 @@ -// +build !windows,go1.6 +// +build !windows package shellwords @@ -10,7 +10,10 @@ import ( ) func shellRun(line, dir string) (string, error) { - shell := os.Getenv("SHELL") + var shell string + if shell = os.Getenv("SHELL"); shell == "" { + shell = "/bin/sh" + } cmd := exec.Command(shell, "-c", line) if dir != "" { cmd.Dir = dir |