Created
September 7, 2013 00:35
-
-
Save tamzinblake/6471732 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff master | |
diff --git a/lib/ls.js b/lib/ls.js | |
index 842b612..194aae6 100644 | |
--- a/lib/ls.js | |
+++ b/lib/ls.js | |
@@ -63,6 +63,8 @@ function ls (args, silent, cb) { | |
} | |
console.log(out) | |
+ if (args.length && !data._found) process.exitCode = 1 | |
+ | |
// if any errors were found, then complain and exit status 1 | |
if (lite.problems && lite.problems.length) { | |
er = lite.problems.join('\n') | |
diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js | |
index 8637592..a82f97e 100644 | |
--- a/lib/utils/error-handler.js | |
+++ b/lib/utils/error-handler.js | |
@@ -44,7 +44,7 @@ process.on("exit", function (code) { | |
}) | |
function exit (code, noLog) { | |
- exitCode = exitCode || code | |
+ exitCode = exitCode || process.exitCode || code | |
var doExit = npm.config.get("_exit") | |
log.verbose("exit", [code, doExit]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment