summaryrefslogtreecommitdiff
path: root/deps/npm/lib/bin.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/bin.js')
-rw-r--r--deps/npm/lib/bin.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/deps/npm/lib/bin.js b/deps/npm/lib/bin.js
index bd82bc9e31..719e8870dd 100644
--- a/deps/npm/lib/bin.js
+++ b/deps/npm/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")
}
}