aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper/direct.go
diff options
context:
space:
mode:
Diffstat (limited to 'helper/direct.go')
-rw-r--r--helper/direct.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/helper/direct.go b/helper/direct.go
index 24f9e75d..91e40451 100644
--- a/helper/direct.go
+++ b/helper/direct.go
@@ -62,11 +62,11 @@ func (h *direct) Wait() error {
if h.Cmd.Process == nil {
return errors.New("exec: not started")
}
+ defer h.p.mustClosePipes()
if h.Cmd.ProcessState != nil {
return errors.New("exec: Wait was already called")
}
- defer h.p.mustClosePipes()
return h.Cmd.Wait()
}