From 1b89ee877338873473fdee0ca20571ac51686b6e Mon Sep 17 00:00:00 2001 From: Scott Addie Date: Sun, 5 Mar 2017 20:49:25 -0600 Subject: [PATCH] Add console.warn to process.stdin catch block --- src/reporters/base-reporter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/reporters/base-reporter.js b/src/reporters/base-reporter.js index a54b86a3a6..3c9560fdb3 100644 --- a/src/reporters/base-reporter.js +++ b/src/reporters/base-reporter.js @@ -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();