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

bin.js « lib « npm « deps - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1d776365c2f45d099761ac5f45a66b3aebbcbe96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const npm = require('./npm.js')
const output = require('./utils/output.js')
const usageUtil = require('./utils/usage.js')
const completion = require('./utils/completion/none.js')
const PATH = require('./utils/path.js')
const cmd = (args, cb) => bin(args).then(() => cb()).catch(cb)
const usage = usageUtil('bin', 'npm bin [-g]')
const bin = async (args, cb) => {
  const b = npm.bin
  output(b)
  if (npm.flatOptions.global && !PATH.includes(b))
    console.error('(not in PATH env variable)')
}
module.exports = Object.assign(cmd, { usage, completion })