summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npmconf/lib/set-user.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npmconf/lib/set-user.js')
-rw-r--r--deps/npm/node_modules/npmconf/lib/set-user.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/npm/node_modules/npmconf/lib/set-user.js b/deps/npm/node_modules/npmconf/lib/set-user.js
index 2e7774aec3..cf29b1ace2 100644
--- a/deps/npm/node_modules/npmconf/lib/set-user.js
+++ b/deps/npm/node_modules/npmconf/lib/set-user.js
@@ -1,10 +1,13 @@
module.exports = setUser
+var Conf = require('../npmconf.js').Conf
+var assert = require('assert')
var path = require('path')
var fs = require('fs')
function setUser (cb) {
- var defaultConf = Object.getPrototypeOf(this.root)
+ var defaultConf = this.root
+ assert(defaultConf !== Object.prototype)
// If global, leave it as-is.
// If not global, then set the user to the owner of the prefix folder.