diff --git a/ncmd/cmd.go b/ncmd/cmd.go index f1820a0..a85afb7 100644 --- a/ncmd/cmd.go +++ b/ncmd/cmd.go @@ -289,8 +289,8 @@ func (c *Cmd) run() { } c.stdIn, _ = cmd.StdinPipe() - c.Env = cmd.Env - c.Dir = cmd.Dir + cmd.Env = c.Env + cmd.Dir = c.Dir // Always close output streams. Do not do this after Wait because if Start // fails and we return without closing these, it could deadlock the caller