inherit environment from the parent process

This commit is contained in:
Brian Picciano 2022-01-22 20:57:59 -07:00
parent 530c868949
commit 20cb7b9255

View File

@ -96,9 +96,10 @@ func RunProcessOnce(ctx context.Context, logger Logger, cfg Config) error {
}
cmd := exec.Command(cfg.Cmd, cfg.Args...)
cmd.Dir = cfg.Dir
cmd.Env = make([]string, 0, len(cfg.Env))
cmd.Dir = cfg.Dir
cmd.Env = os.Environ()
for k, v := range cfg.Env {
cmd.Env = append(cmd.Env, k+"="+v)
}