diff --git a/pmuxproc/pmuxproc.go b/pmuxproc/pmuxproc.go index a9469d1..fe6e6e8 100644 --- a/pmuxproc/pmuxproc.go +++ b/pmuxproc/pmuxproc.go @@ -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) }