diff options
author | isaacs <i@izs.me> | 2011-04-27 05:39:50 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-04-27 05:39:50 +0400 |
commit | 94e3d6eea3674a5f4969c69699cec762e8ab9398 (patch) | |
tree | 47f1a1082b159dd05d47f0e39c7cee6da02aab79 | |
parent | a39d274b9faa272184b87779b9ba8d1e88ba5d55 (diff) |
Allow load without any cb.
The better to test stuff out in the repl.
-rw-r--r-- | npm.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -155,6 +155,8 @@ var loaded = false npm.load = function (conf, cb_) { if (!cb_ && typeof conf === "function") cb_ = conf , conf = {} + if (!cb_) cb_ = function () {} + if (!conf) conf = {} loadListeners.push(cb_) if (loaded) return cb() if (loading) return @@ -179,6 +181,7 @@ npm.load = function (conf, cb_) { onload = false } } + log.waitForConfig() which(process.argv[0], function (er, node) { if (!er && node !== process.execPath) { |