diff options
author | isaacs <i@izs.me> | 2012-07-17 00:28:37 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-07-17 00:28:37 +0400 |
commit | 1977584a975db9fbc2cd36b34ea2e4743f465dd4 (patch) | |
tree | 7918d085aeabdf2cd4416277b2ed626d9ca1485b /lib/bin.js | |
parent | 4431b14b1eedfa4fd03edc6e2c8388096ee859e7 (diff) |
Replace lib/utils/output.js with console.log
Diffstat (limited to 'lib/bin.js')
-rw-r--r-- | lib/bin.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/bin.js b/lib/bin.js index bd82bc9e3..719e8870d 100644 --- a/lib/bin.js +++ b/lib/bin.js @@ -1,19 +1,18 @@ module.exports = bin var npm = require("./npm.js") - , output = require("./utils/output.js") bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)" -function bin (args, cb) { - var path = require("path") - , b = npm.bin +function bin (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + var b = npm.bin , PATH = (process.env.PATH || "").split(":") - output.write(b, function (er) { cb(er, b) }) + if (!silent) console.log(b) + process.nextTick(cb.bind(this, null, b)) if (npm.config.get("global") && PATH.indexOf(b) === -1) { - output.write("(not in PATH env variable)" - ,npm.config.get("logfd")) + npm.config.get("logstream").write("(not in PATH env variable)\n") } } |