packer/plugin: Preserve parent ENV when executing client

This commit is contained in:
Mitchell Hashimoto 2013-06-05 20:39:39 -07:00
parent b1bd71c133
commit 34f4086963
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"errors"
"io"
"log"
"os"
"os/exec"
"strings"
"sync"
@ -93,6 +94,7 @@ func (c *client) Start() (address string, err error) {
stdout := 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.Stderr = stderr
c.cmd.Stdout = stdout