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

bin.js « lib - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 73abe3c88fc67137b8e0f7d5080b7aab561621f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module.exports = bin

var npm = require("../npm")
  , output = require("./utils/output")

function bin (args, cb) {
  var path = require("path")
    , global = npm.config.get("global")
    , b = global ? path.join(npm.prefix, "bin") : path.join(npm.dir, ".bin")
    , PATH = (process.env.PATH || "").split(":")
  output.write(b, cb)
  if (npm.config.get("global") && PATH.indexOf(b) === -1) {
    output.write("(not in PATH env variable)"
                ,npm.config.get("logfd"))
  }
}