inherit environment from the parent process
This commit is contained in:
parent
530c868949
commit
20cb7b9255
@ -96,9 +96,10 @@ func RunProcessOnce(ctx context.Context, logger Logger, cfg Config) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command(cfg.Cmd, cfg.Args...)
|
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 {
|
for k, v := range cfg.Env {
|
||||||
cmd.Env = append(cmd.Env, k+"="+v)
|
cmd.Env = append(cmd.Env, k+"="+v)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user