preserve environment variables executing expansion

Running tests locally fail because $PATH is destroyed
pull/191/head
Adam Reese 9 years ago
parent 812e121002
commit 1ce72d0e3d

@ -23,6 +23,7 @@ import (
"io" "io"
"io/ioutil" "io/ioutil"
"log" "log"
"os"
"os/exec" "os/exec"
"path" "path"
"path/filepath" "path/filepath"
@ -281,10 +282,7 @@ func (e *expander) ExpandTemplate(template *common.Template) (string, error) {
Args: []string{e.ExpansionBinary, template.Content}, Args: []string{e.ExpansionBinary, template.Content},
// TODO(vagababov): figure out whether do we even need "PROJECT" and // TODO(vagababov): figure out whether do we even need "PROJECT" and
// "DEPLOYMENT_NAME" variables here. // "DEPLOYMENT_NAME" variables here.
Env: []string{ Env: append(os.Environ(), "PROJECT="+template.Name, "DEPLOYMENT_NAME="+template.Name),
"PROJECT=" + template.Name,
"DEPLOYMENT_NAME=" + template.Name,
},
Stdout: &stdout, Stdout: &stdout,
Stderr: &stderr, Stderr: &stderr,
} }

Loading…
Cancel
Save