Skip to content

Commit

Permalink
fix bug testing filters in :push
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatsuo committed Jul 13, 2014
1 parent d12e763 commit 61d325d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ func testFilter(jq *JQShell) error {
}()
select {
case <-done:
return fmt.Errorf("%s (%v)", errbuf.Bytes(), err)
if err != nil {
return fmt.Errorf("%s (%v)", errbuf.Bytes(), err)
}
return nil
case <-time.After(testFilterTimeout):
close(stop)
return fmt.Errorf("jq timed out processing the filter")
Expand Down

0 comments on commit 61d325d

Please sign in to comment.