Release pipe commands

This commit is contained in:
Liang Ding 2014-09-21 20:53:59 +08:00
parent d646211562
commit a4047f450e
1 changed files with 4 additions and 0 deletions

View File

@ -145,6 +145,10 @@ func pipeCommands(username string, commands ...*exec.Cmd) string {
out, err := last.CombinedOutput() out, err := last.CombinedOutput()
for _, command := range commands[:len(commands)-1] {
command.Wait()
}
if err != nil { if err != nil {
return err.Error() return err.Error()
} }