summaryrefslogtreecommitdiff
path: root/utils/utils.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-10-02 17:16:43 -0700
committerGitHub <noreply@github.com>2018-10-02 17:16:43 -0700
commitd5687946f6a0aa14a5326f26ca0ceca68588056f (patch)
tree888c74c05f061cda2f53829969634e31a0d41643 /utils/utils.go
parentb63b1f9cb638db4bc3fdf69a50857b6d04efb6d7 (diff)
parent4f825f2e079c1cf3ec6c9fd2c5378ce2db18d4f0 (diff)
downloadpodman-d5687946f6a0aa14a5326f26ca0ceca68588056f.tar.gz
podman-d5687946f6a0aa14a5326f26ca0ceca68588056f.tar.bz2
podman-d5687946f6a0aa14a5326f26ca0ceca68588056f.zip
Merge pull request #1528 from baude/runlabel
Add container runlabel command
Diffstat (limited to 'utils/utils.go')
-rw-r--r--utils/utils.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/utils.go b/utils/utils.go
index 9b7cebfea..c7c5ab5cf 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -29,11 +29,14 @@ func ExecCmd(name string, args ...string) (string, error) {
}
// ExecCmdWithStdStreams execute a command with the specified standard streams.
-func ExecCmdWithStdStreams(stdin io.Reader, stdout, stderr io.Writer, name string, args ...string) error {
+func ExecCmdWithStdStreams(stdin io.Reader, stdout, stderr io.Writer, env []string, name string, args ...string) error {
cmd := exec.Command(name, args...)
cmd.Stdin = stdin
cmd.Stdout = stdout
cmd.Stderr = stderr
+ if env != nil {
+ cmd.Env = env
+ }
err := cmd.Run()
if err != nil {