diff options
Diffstat (limited to 'deps/npm/lib/config.js')
-rw-r--r-- | deps/npm/lib/config.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index d2a6a89f69..c79cdc5b8b 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -18,6 +18,7 @@ var log = require("npmlog") , ini = require("ini") , editor = require("editor") , os = require("os") + , umask = require("./utils/umask") config.completion = function (opts, cb) { var argv = opts.conf.argv.remain @@ -132,6 +133,7 @@ function set (key, val, cb) { val = val.trim() log.info("config", "set %j %j", key, val) var where = npm.config.get("global") ? "global" : "user" + if (key.match(/umask/)) val = umask.fromString(val) npm.config.set(key, val, where) npm.config.save(where, cb) } @@ -141,7 +143,9 @@ function get (key, cb) { if (!public(key)) { return cb(new Error("---sekretz---")) } - console.log(npm.config.get(key)) + var val = npm.config.get(key) + if (key.match(/umask/)) val = umask.toString(val) + console.log(val) cb() } |