Skip to content

Commit 1bb02a2

Browse files
committed
Merge branch 'Fix_race_conditionon_EOF'
2 parents b5e15fb + 26baa44 commit 1bb02a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jqpipe.go

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ func (p *Pipe) Next() (json.RawMessage, error) {
8282
}
8383
p.stdout.Close()
8484

85+
if err == io.EOF {
86+
p.jq.Wait()
87+
return nil, err
88+
}
89+
8590
// if we have a decoding error, jq is sick and we need to kill it with fire..
8691
if err != io.EOF {
8792
p.Close()

0 commit comments

Comments
 (0)