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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-10-14 19:35:01 +0400
committerisaacs <i@izs.me>2011-10-14 19:35:01 +0400
commit898558c4cd1e73326adda837f776f9c004eb3371 (patch)
tree30f59185fb7c10275df7c629ea9856dbdeca0a10
parentc0cf515fbc965d834f1911568464dfdc3491d785 (diff)
Default user and group to 0 on win32, and always make String the last type
-rw-r--r--lib/utils/config-defs.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/utils/config-defs.js b/lib/utils/config-defs.js
index ac4d2135d..95526e08b 100644
--- a/lib/utils/config-defs.js
+++ b/lib/utils/config-defs.js
@@ -130,7 +130,8 @@ Object.defineProperty(exports, "defaults", {get: function () {
, globalconfig : path.resolve(process.execPath, "..", "..", "etc", "npmrc")
, globalignorefile : path.resolve( process.execPath
, "..", "..", "etc", "npmignore")
- , group : process.env.SUDO_GID || (process.getgid && process.getgid())
+ , group : process.platform === "win32" ? 0
+ : process.env.SUDO_GID || (process.getgid && process.getgid())
, gzipbin : process.env.GZIPBIN
|| ( process.platform === "win32"
? path.resolve( __dirname, "..", "..", "deps"
@@ -185,7 +186,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
&& process.getgid && process.setgid )
|| process.getuid() !== 0
, usage : false
- , user : "nobody"
+ , user : process.platform === "win32" ? 0 : "nobody"
, username : ""
, userconfig : path.resolve(home, ".npmrc")
, userignorefile : path.resolve(home, ".npmignore")
@@ -201,7 +202,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
exports.types =
{ "always-auth" : Boolean
, "bin-publish" : Boolean
- , bindist : [String, null]
+ , bindist : [null, String]
, browser : String
, ca: [null, String]
, cache : path
@@ -214,7 +215,7 @@ exports.types =
, global : Boolean
, globalconfig : path
, globalignorefile: path
- , group : [String, Number]
+ , group : [Number, String]
, gzipbin : String
, "https-proxy" : [null, url]
, ignore : String
@@ -252,7 +253,7 @@ exports.types =
, unicode : Boolean
, "unsafe-perm" : Boolean
, usage : Boolean
- , user : String
+ , user : [Number, String]
, username : String
, userconfig : path
, userignorefile : path
@@ -260,7 +261,6 @@ exports.types =
, version : Boolean
, viewer: String
, yes: [false, null, Boolean]
-
, _exit : Boolean
}