Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
which(process.argv[0], function (er, node) {
if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose("node symlink", node)
process.execPath = node
process.installPrefix = path.resolve(node, "..", "..")
}
// look up configs
//console.error("about to look up configs")
var builtin = path.resolve(__dirname, "..", "npmrc")
npmconf.load(cli, builtin, function (er, conf) {
if (er === conf) er = null
npm.config = conf
var color = conf.get("color")
log.level = conf.get("loglevel")
log.heading = "npm"
log.stream = conf.get("logstream")
switch (color) {
case "always": log.enableColor(); break
case false: log.disableColor(); break
}
log.resume()
if (er) return cb(er)
which(process.argv[0], function (er, node) {
if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose("node symlink", node)
process.execPath = node
process.installPrefix = path.resolve(node, "..", "..")
}
// look up configs
//console.error("about to look up configs")
var builtin = path.resolve(__dirname, "..", "npmrc")
npmconf.load(cli, builtin, function (er, conf) {
if (er === conf) er = null
npm.config = conf
var color = conf.get("color")
log.level = conf.get("loglevel")
log.heading = "npm"
log.stream = conf.get("logstream")
switch (color) {
case "always": log.enableColor(); break
case false: log.disableColor(); break
}
log.resume()
if (er) return cb(er)
which(process.argv[0], function (er, node) {
if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose("node symlink", node)
process.execPath = node
process.installPrefix = path.resolve(node, "..", "..")
}
// look up configs
//console.error("about to look up configs")
var builtin = path.resolve(__dirname, "..", "npmrc")
npmconf.load(cli, builtin, function (er, conf) {
if (er === conf) er = null
npm.config = conf
var color = conf.get("color")
log.level = conf.get("loglevel")
log.heading = "npm"
log.stream = conf.get("logstream")
switch (color) {
case "always": log.enableColor(); break
case false: log.disableColor(); break
}
log.resume()
if (er) return cb(er)
which(process.argv[0], function (er, node) {
if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose("node symlink", node)
process.execPath = node
process.installPrefix = path.resolve(node, "..", "..")
}
// look up configs
//console.error("about to look up configs")
var builtin = path.resolve(__dirname, "..", "npmrc")
npmconf.load(cli, builtin, function (er, conf) {
if (er === conf) er = null
npm.config = conf
var color = conf.get("color")
log.level = conf.get("loglevel")
log.heading = "npm"
log.stream = conf.get("logstream")
switch (color) {
case "always": log.enableColor(); break
case false: log.disableColor(); break
}
log.resume()
if (er) return cb(er)
which(process.argv[0], function (er, node) {
if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
log.verbose("node symlink", node)
process.execPath = node
process.installPrefix = path.resolve(node, "..", "..")
}
// look up configs
//console.error("about to look up configs")
var builtin = path.resolve(__dirname, "..", "npmrc")
npmconf.load(cli, builtin, function (er, conf) {
if (er === conf) er = null
npm.config = conf
var color = conf.get("color")
log.level = conf.get("loglevel")
log.heading = "npm"
log.stream = conf.get("logstream")
switch (color) {
case "always": log.enableColor(); break
case false: log.disableColor(); break
}
log.resume()
if (er) return cb(er)
.fail(function (err) {
// Trying to use a local file failed, so initiate download and install
// steps instead.
var npmconfDeferred = kew.defer()
npmconf.load(npmconfDeferred.makeNodeResolver())
return npmconfDeferred.promise
})
.then(function (conf) {
.fail(function (err) {
// Trying to use a local file failed, so initiate download and install
// steps instead.
var npmconfDeferred = kew.defer()
npmconf.load(npmconfDeferred.makeNodeResolver())
return npmconfDeferred.promise
})
.then(function (conf) {
.fail(function (err) {
// Trying to use a local file failed, so initiate download and install
// steps instead.
var npmconfDeferred = kew.defer()
npmconf.load(npmconfDeferred.makeNodeResolver())
return npmconfDeferred.promise
})
.then(function (conf) {
.fail(function (err) {
// Trying to use a local file failed, so initiate download and install
// steps instead.
var npmconfDeferred = kew.defer()
npmconf.load(npmconfDeferred.makeNodeResolver())
return npmconfDeferred.promise
})
.then(function (conf) {
function applyProxy(options, cb) {
npmconf.load({}, function (er, conf) {
var proxyUrl;
if (!er) {
['https-proxy', 'proxy', 'http-proxy'].some(function(setting) {
var npmProxyUrl = conf.get(setting);
if (npmProxyUrl) {
proxyUrl = npmProxyUrl;
return true;
}
});
}
if (!proxyUrl) {
var env = process.env;
proxyUrl = env.HTTPS_PROXY || env.https_proxy || env.HTTP_PROXY || env.http_proxy;
}