Skip to content

Commit

Permalink
Add console.warn to process.stdin catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
scottaddie authored and Daniel15 committed Mar 11, 2017
1 parent 7466829 commit 1b89ee8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/reporters/base-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ export default class BaseReporter {
_getStandardInput(): Stdin {
let standardInput;

// Accessing stdin in a win32 headless process (e.g., Visual Studio) may throw an exception.
try {
standardInput = process.stdin;
} catch (e) {
console.warn(e.message);
delete process.stdin;
// $FlowFixMe: this is valid!
process.stdin = new EventEmitter();
Expand Down

0 comments on commit 1b89ee8

Please sign in to comment.