"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/bin.js" (8 Mar 2017, 515 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 module.exports = bin
    2 
    3 var npm = require('./npm.js')
    4 var osenv = require('osenv')
    5 var output = require('./utils/output.js')
    6 
    7 bin.usage = 'npm bin [--global]'
    8 
    9 function bin (args, silent, cb) {
   10   if (typeof cb !== 'function') {
   11     cb = silent
   12     silent = false
   13   }
   14   var b = npm.bin
   15   var PATH = osenv.path()
   16 
   17   if (!silent) output(b)
   18   process.nextTick(cb.bind(this, null, b))
   19 
   20   if (npm.config.get('global') && PATH.indexOf(b) === -1) {
   21     npm.config.get('logstream').write('(not in PATH env variable)\n')
   22   }
   23 }