Skip to content

Commit 7e259fd

Browse files
committed
Report ExecForEach command exit errors to the pipe
1 parent dbe8ad2 commit 7e259fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

script.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,11 @@ func (p *Pipe) ExecForEach(cmdLine string) *Pipe {
433433
fmt.Fprintln(w, err)
434434
continue
435435
}
436-
cmd.Wait()
436+
err = cmd.Wait()
437+
if err != nil {
438+
fmt.Fprintln(w, err)
439+
continue
440+
}
437441
}
438442
return scanner.Err()
439443
})

0 commit comments

Comments
 (0)