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

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

var getUid = require("uid-number")

// Call in the context of a npmconf object

function loadUid (cb) {
  // if we're not in unsafe-perm mode, then figure out who
  // to run stuff as.  Do this first, to support `npm update npm -g`
  if (!this.get("unsafe-perm")) {
    getUid(this.get("user"), this.get("group"), cb)
  } else {
    process.nextTick(cb)
  }
}