Merge "Use env variables only for exec process in KRM toolbox"

This commit is contained in:
Zuul 2021-04-20 16:56:48 +00:00 committed by Gerrit Code Review
commit f1360cbbd4

View File

@ -92,12 +92,13 @@ func (c *ScriptRunner) Run() error {
c.ResourceList.Items = nil
os.Setenv(EnvRenderedBundlePath, bundlePath)
clicmd := exec.Command(scriptPath)
clicmd.Stdout = c.OutStream
clicmd.Stderr = c.ErrStream
clicmd.Env = os.Environ()
clicmd.Env = append(clicmd.Env, fmt.Sprintf("%s=%s", EnvRenderedBundlePath, bundlePath))
err = clicmd.Start()
if err != nil {
return err