Pass environment through to go language programs (#1965)

This allows those programs to use authentication credentials that are
in the environment to perform extra work.
This commit is contained in:
Nate Jones 2018-09-20 15:17:18 -07:00 committed by Sean Gillespie
parent 9c7fff2d7d
commit 0ea261baf4

View file

@ -179,7 +179,7 @@ func (host *goLanguageHost) constructEnv(req *pulumirpc.RunRequest) ([]string, e
return nil, err
}
var env []string
env := os.Environ()
maybeAppendEnv := func(k, v string) {
if v != "" {
env = append(env, fmt.Sprintf("%s=%s", k, v))