diff options
author | Rebecca Turner <me@re-becca.org> | 2016-04-30 02:58:25 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2016-06-16 23:44:42 +0300 |
commit | 63f153c743f9354376bfb9dad42bd028a320fd1f (patch) | |
tree | 5104789ebb01670de011d302ad60ea6c7794397e /lib/bin.js | |
parent | d28b7a7e0f102412cbef85130d0425a15f0aca7d (diff) |
output: Standardize how we write to stdout
This allows us to consistently make sure that the progress bar is hidden
before we try to write to stdout.
PR-URL: https://github.com/npm/npm/pull/13075
Credit: @iarna
Diffstat (limited to 'lib/bin.js')
-rw-r--r-- | lib/bin.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bin.js b/lib/bin.js index 2e02617d3..7258893b9 100644 --- a/lib/bin.js +++ b/lib/bin.js @@ -2,6 +2,7 @@ module.exports = bin var npm = require('./npm.js') var osenv = require('osenv') +var output = require('./utils/output.js') bin.usage = 'npm bin [--global]' @@ -13,7 +14,7 @@ function bin (args, silent, cb) { var b = npm.bin var PATH = osenv.path() - if (!silent) console.log(b) + if (!silent) output(b) process.nextTick(cb.bind(this, null, b)) if (npm.config.get('global') && PATH.indexOf(b) === -1) { |