Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle EPIPE to avoid crash when piped to other process (like head). #134

Merged
merged 1 commit into from
Aug 12, 2016

Conversation

jarib
Copy link
Contributor

@jarib jarib commented Aug 11, 2016

Without this patch, json2csv will crash when it receives EPIPE from the process it's piped into.

$ cat big.json | json2csv | head -10
//...csv data...
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:856:11)
    at WriteWrap.afterWrite (net.js:763:14)

@coveralls
Copy link

coveralls commented Aug 11, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling ace5700 on jarib:handle-epipe into 5c4c18e on zemirco:master.

@knownasilya knownasilya merged commit 69a8722 into zemirco:master Aug 12, 2016
knownasilya pushed a commit that referenced this pull request Aug 17, 2016
- Fix crashing on EPIPE error [#134]
- Add UMD build for browser usage [#136]
- Add docs during prepublish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants