UNPKG

dredd

Version:

HTTP API Testing Framework

10 lines (9 loc) 432 B
// On Windows, killing stdin / stdout / stderr pipes intentionally // on either side can result `uncaughtException` causing // dredd main process exiting with exitCode 7 instead of 1. This _fix_ // remedies the issue. module.exports = function ignorePipeErrors(proc) { if (proc.stdout) proc.stdout.on('error', () => {}); if (proc.stderr) proc.stderr.on('error', () => {}); if (proc.stdin) proc.stdin.on('error', () => {}); };