aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/mattn/go-shellwords/util_posix.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-04 13:26:38 -0700
committerGitHub <noreply@github.com>2019-10-04 13:26:38 -0700
commit2c2782a2179aee6c76d90e864708e2e5ceb09349 (patch)
treec61aa40e008b7fcb371d899880a4afd1714f50af /vendor/github.com/mattn/go-shellwords/util_posix.go
parentbd08fc0e9b3a9943008585879877b68789e38c31 (diff)
parentd3f59bedb393521986e645bc48c47938f321b643 (diff)
downloadpodman-2c2782a2179aee6c76d90e864708e2e5ceb09349.tar.gz
podman-2c2782a2179aee6c76d90e864708e2e5ceb09349.tar.bz2
podman-2c2782a2179aee6c76d90e864708e2e5ceb09349.zip
Merge pull request #4165 from mtrmac/c-image-4
Update c/image to v4.0.0 + Buildah to 1.11.3
Diffstat (limited to 'vendor/github.com/mattn/go-shellwords/util_posix.go')
-rw-r--r--vendor/github.com/mattn/go-shellwords/util_posix.go8
1 files changed, 6 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 eaf1011d6..3aef2c4d7 100644
--- a/vendor/github.com/mattn/go-shellwords/util_posix.go
+++ b/vendor/github.com/mattn/go-shellwords/util_posix.go
@@ -9,9 +9,13 @@ import (
"strings"
)
-func shellRun(line string) (string, error) {
+func shellRun(line, dir string) (string, error) {
shell := os.Getenv("SHELL")
- b, err := exec.Command(shell, "-c", line).Output()
+ cmd := exec.Command(shell, "-c", line)
+ if dir != "" {
+ cmd.Dir = dir
+ }
+ b, err := cmd.Output()
if err != nil {
if eerr, ok := err.(*exec.ExitError); ok {
b = eerr.Stderr