diff --git a/runbook/executor.go b/runbook/executor.go index c8fc71d5..1f353229 100644 --- a/runbook/executor.go +++ b/runbook/executor.go @@ -51,6 +51,7 @@ func Execute(executablePath string, args, environmentVars []string, stdout, stde cmd.Stderr = stderrBuff if stderr != nil { cmd.Stderr = io.MultiWriter(stderr, cmd.Stderr) + defer stderr.Close() } if stdout != nil { cmd.Stdout = stdout