"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/config/load-uid.js" (8 Mar 2017, 386 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 = loadUid
    2 
    3 var getUid = require('uid-number')
    4 
    5 // Call in the context of a npmconf object
    6 
    7 function loadUid (cb) {
    8   // if we're not in unsafe-perm mode, then figure out who
    9   // to run stuff as.  Do this first, to support `npm update npm -g`
   10   if (!this.get('unsafe-perm')) {
   11     getUid(this.get('user'), this.get('group'), cb)
   12   } else {
   13     process.nextTick(cb)
   14   }
   15 }