From 157b508ad97cf954592b2a2f6639fafaa3fc12f0 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 4 May 2020 23:32:33 -0700 Subject: [PATCH] refactor: allow non-empty stderr in runSync (#410) --- lib/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/run.js b/lib/run.js index fac94f48..5cc977a7 100644 --- a/lib/run.js +++ b/lib/run.js @@ -56,7 +56,7 @@ exports.runSync = function(cmd, args, options) { }, options)); if (child.error) { throw child.error; - } else if (child.stderr.length) { + } else if (child.status !== 0) { throw new Error(child.stderr.toString()); } else { return child.stdout.toString();