mirror of
https://github.com/nodejs/node.git
synced 2025-05-13 10:54:13 +00:00

Contains the following npm releases: - https://github.com/npm/npm/releases/tag/v3.9.6 - https://github.com/npm/npm/releases/tag/v3.10.0 - https://github.com/npm/npm/releases/tag/v3.10.1 - https://github.com/npm/npm/releases/tag/v3.10.2 PR-URL: https://github.com/nodejs/node/pull/7410 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
24 lines
515 B
JavaScript
24 lines
515 B
JavaScript
module.exports = bin
|
|
|
|
var npm = require('./npm.js')
|
|
var osenv = require('osenv')
|
|
var output = require('./utils/output.js')
|
|
|
|
bin.usage = 'npm bin [--global]'
|
|
|
|
function bin (args, silent, cb) {
|
|
if (typeof cb !== 'function') {
|
|
cb = silent
|
|
silent = false
|
|
}
|
|
var b = npm.bin
|
|
var PATH = osenv.path()
|
|
|
|
if (!silent) output(b)
|
|
process.nextTick(cb.bind(this, null, b))
|
|
|
|
if (npm.config.get('global') && PATH.indexOf(b) === -1) {
|
|
npm.config.get('logstream').write('(not in PATH env variable)\n')
|
|
}
|
|
}
|