Commit ca5f7de9 authored by vaikas-google's avatar vaikas-google

Merge pull request #191 from adamreese/preserve-env-vars

Preserve environment variables executing expansion
parents b2ebb24c 1ce72d0e
...@@ -23,6 +23,7 @@ import ( ...@@ -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) { ...@@ -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,
} }
......
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