Commit 34f40869 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/plugin: Preserve parent ENV when executing client

parent b1bd71c1
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"errors" "errors"
"io" "io"
"log" "log"
"os"
"os/exec" "os/exec"
"strings" "strings"
"sync" "sync"
...@@ -93,6 +94,7 @@ func (c *client) Start() (address string, err error) { ...@@ -93,6 +94,7 @@ func (c *client) Start() (address string, err error) {
stdout := new(bytes.Buffer) stdout := new(bytes.Buffer)
stderr := new(bytes.Buffer) stderr := new(bytes.Buffer)
c.cmd.Env = append(c.cmd.Env, os.Environ()...)
c.cmd.Env = append(c.cmd.Env, env...) c.cmd.Env = append(c.cmd.Env, env...)
c.cmd.Stderr = stderr c.cmd.Stderr = stderr
c.cmd.Stdout = stdout c.cmd.Stdout = stdout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment