diff --git a/krm-functions/toolbox/main.go b/krm-functions/toolbox/main.go index 281ec186c..74e602e03 100644 --- a/krm-functions/toolbox/main.go +++ b/krm-functions/toolbox/main.go @@ -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