Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-07-17 00:28:37 +0400
committerisaacs <i@izs.me>2012-07-17 00:28:37 +0400
commit1977584a975db9fbc2cd36b34ea2e4743f465dd4 (patch)
tree7918d085aeabdf2cd4416277b2ed626d9ca1485b /lib/bin.js
parent4431b14b1eedfa4fd03edc6e2c8388096ee859e7 (diff)
Replace lib/utils/output.js with console.log
Diffstat (limited to 'lib/bin.js')
-rw-r--r--lib/bin.js13
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")
}
}