Skip to content

Commit b5e15fb

Browse files
committed
fix pipe.Close where io.EOF not reached
1 parent 1d1e120 commit b5e15fb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

jqpipe.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,8 @@ func (p *Pipe) Next() (json.RawMessage, error) {
108108
func (p *Pipe) Close() error {
109109
if p.stdout != nil {
110110
p.stdout.Close()
111-
return nil
112111
}
113-
if p.jq != nil {
112+
if p.jq == nil {
114113
return nil
115114
}
116115
if p.jq.ProcessState != nil && p.jq.ProcessState.Exited() {

0 commit comments

Comments
 (0)