diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-19 17:50:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 17:50:11 +0100 |
commit | f2bcc9cc7dc8b1937f39db503db96651d84c3e3e (patch) | |
tree | 2999b7f3be8cc23ed3b9653966c389cd7b55d468 /vendor/github.com/mattn | |
parent | aa1bb0b579fa053c3b0c47668dc8be0fa7f987f4 (diff) | |
parent | 86be569961b6dc73d15cbf9e709a12e586ba0077 (diff) | |
download | podman-f2bcc9cc7dc8b1937f39db503db96651d84c3e3e.tar.gz podman-f2bcc9cc7dc8b1937f39db503db96651d84c3e3e.tar.bz2 podman-f2bcc9cc7dc8b1937f39db503db96651d84c3e3e.zip |
Merge pull request #5258 from containers/dependabot/go_modules/github.com/containers/storage-1.16.0
build(deps): bump github.com/containers/storage from 1.15.8 to 1.16.0
Diffstat (limited to 'vendor/github.com/mattn')
-rw-r--r-- | vendor/github.com/mattn/go-shellwords/util_go15.go | 29 | ||||
-rw-r--r-- | vendor/github.com/mattn/go-shellwords/util_posix.go | 7 | ||||
-rw-r--r-- | vendor/github.com/mattn/go-shellwords/util_windows.go | 7 |
3 files changed, 10 insertions, 33 deletions
diff --git a/vendor/github.com/mattn/go-shellwords/util_go15.go b/vendor/github.com/mattn/go-shellwords/util_go15.go deleted file mode 100644 index ddcbf229e..000000000 --- a/vendor/github.com/mattn/go-shellwords/util_go15.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build !go1.6 - -package shellwords - -import ( - "os" - "os/exec" - "runtime" - "strings" -) - -func shellRun(line, dir string) (string, error) { - var b []byte - var err error - var cmd *exec.Cmd - if runtime.GOOS == "windows" { - cmd = exec.Command(os.Getenv("COMSPEC"), "/c", line) - } else { - cmd = exec.Command(os.Getenv("SHELL"), "-c", line) - } - if dir != "" { - cmd.Dir = dir - } - b, err = cmd.Output() - if err != nil { - return "", err - } - return strings.TrimSpace(string(b)), nil -} 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 diff --git a/vendor/github.com/mattn/go-shellwords/util_windows.go b/vendor/github.com/mattn/go-shellwords/util_windows.go index cda685091..20546737c 100644 --- a/vendor/github.com/mattn/go-shellwords/util_windows.go +++ b/vendor/github.com/mattn/go-shellwords/util_windows.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("COMSPEC") + var shell string + if shell = os.Getenv("COMSPEC"); shell == "" { + shell = "cmd" + } cmd := exec.Command(shell, "/c", line) if dir != "" { cmd.Dir = dir |