diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-11-04 15:08:12 -0800 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-11-05 10:35:43 -0800 |
commit | 28ae70ebad8debd8aa7b521a693aa3de89ad84d6 (patch) | |
tree | c5cd9142bbefe8f84c9555e07cafd677530cb7ef /deps/npm/lib/config.js | |
parent | 272aa589af50566a20a491910d4dc40bb3692102 (diff) | |
download | android-node-v8-28ae70ebad8debd8aa7b521a693aa3de89ad84d6.tar.gz android-node-v8-28ae70ebad8debd8aa7b521a693aa3de89ad84d6.tar.bz2 android-node-v8-28ae70ebad8debd8aa7b521a693aa3de89ad84d6.zip |
npm: Upgrade to v2.1.6
Diffstat (limited to 'deps/npm/lib/config.js')
-rw-r--r-- | deps/npm/lib/config.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index 8dc814acd0..f51156aad4 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -11,8 +11,9 @@ config.usage = "npm config set <key> <value>" var log = require("npmlog") , npm = require("./npm.js") + , npmconf = require("./config/core.js") , fs = require("graceful-fs") - , npmconf = require("npmconf") + , writeFileAtomic = require("write-file-atomic") , types = npmconf.defs.types , ini = require("ini") , editor = require("editor") @@ -88,17 +89,16 @@ function edit (cb) { if (key === "logstream") return arr return arr.concat( ini.stringify(obj) - .replace(/\n$/m, '') - .replace(/^/g, '; ') - .replace(/\n/g, '\n; ') - .split('\n')) + .replace(/\n$/m, "") + .replace(/^/g, "; ") + .replace(/\n/g, "\n; ") + .split("\n")) }, [])) .concat([""]) .join(os.EOL) - fs.writeFile + writeFileAtomic ( f , data - , "utf8" , function (er) { if (er) return cb(er) editor(f, { editor: e }, cb) |