From d8281564d439bf6afda677d327a16232906fe050 Mon Sep 17 00:00:00 2001 From: Benjamin Flesch Date: Mon, 16 Nov 2015 18:02:26 +0100 Subject: [PATCH] Add options.breakOnStdErrOnly so only exit code is relevant --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a632b6a..ac47e06 100644 --- a/index.js +++ b/index.js @@ -75,7 +75,7 @@ var PythonShell = function (script, options) { this.childProcess.on('exit', function (code) { var err; - if (errorData || code !== 0) { + if ((errorData && !options.breakOnStdErrOnly) || code !== 0) { if (errorData) { err = self.parseError(errorData); } else {