diff options
Diffstat (limited to 'lib/prefix.js')
-rw-r--r-- | lib/prefix.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/prefix.js b/lib/prefix.js index f37aacf2c..e002edea1 100644 --- a/lib/prefix.js +++ b/lib/prefix.js @@ -1,10 +1,11 @@ module.exports = prefix var npm = require("./npm.js") - , output = require("./utils/output.js") prefix.usage = "npm prefix\nnpm prefix -g\n(just prints the prefix folder)" -function prefix (args, cb) { - output.write(npm.prefix, function (er) { cb(er, npm.prefix) }) +function prefix (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!silent) console.log(npm.prefix) + process.nextTick(cb.bind(this, null, npm.prefix)) } |