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();