Skip to content

Commit

Permalink
refactor: check whether process has opened std in/out/err
Browse files Browse the repository at this point in the history
  • Loading branch information
michalholasek committed Jun 20, 2018
1 parent b08b0c8 commit 193355d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ignore-pipe-errors.js
@@ -1,5 +1,7 @@
module.exports = function ignorePipeErrors(proc) {
proc.stdin.on('error', () => {});
proc.stdout.on('error', () => {});
proc.stderr.on('error', () => {});
if (proc.stdin && proc.stdout && proc.stderr) {
proc.stdout.on('error', () => {});
proc.stderr.on('error', () => {});
proc.stdin.on('error', () => {});
}
};

0 comments on commit 193355d

Please sign in to comment.