summaryrefslogtreecommitdiff
path: root/deps/npm/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-06-04 11:42:32 -0700
committerisaacs <i@izs.me>2013-06-04 11:42:32 -0700
commitf28f67cf759258492537495c016b2b01d2b0f9de (patch)
tree8004bdff9abbab3b915087c85f6fb244d6968669 /deps/npm/lib
parent51226b84cf5e2cac7a1fa4b4b5379727fa3415fc (diff)
downloadandroid-node-v8-f28f67cf759258492537495c016b2b01d2b0f9de.tar.gz
android-node-v8-f28f67cf759258492537495c016b2b01d2b0f9de.tar.bz2
android-node-v8-f28f67cf759258492537495c016b2b01d2b0f9de.zip
npm: Upgrade to 1.2.25
Diffstat (limited to 'deps/npm/lib')
-rw-r--r--deps/npm/lib/config.js4
-rw-r--r--deps/npm/lib/utils/error-handler.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js
index dfd51c84a3..12879440eb 100644
--- a/deps/npm/lib/config.js
+++ b/deps/npm/lib/config.js
@@ -17,6 +17,7 @@ var log = require("npmlog")
, types = npmconf.defs.types
, ini = require("ini")
, editor = require("editor")
+ , os = require("os")
config.completion = function (opts, cb) {
var argv = opts.conf.argv.remain
@@ -63,7 +64,6 @@ function edit (cb) {
var e = npm.config.get("editor")
, which = npm.config.get("global") ? "global" : "user"
, f = npm.config.get(which + "config")
- , eol = process.platform === "win32" ? "\r\n" : "\n"
if (!e) return cb(new Error("No EDITOR config or environ set."))
npm.config.save(which, function (er) {
if (er) return cb(er)
@@ -87,7 +87,7 @@ function edit (cb) {
return "; " + k + " = " + npmconf.defaults[k]
}))
.concat([""])
- .join(eol)
+ .join(os.EOL)
fs.writeFile
( f
, data
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index 83d9ede176..32b0506435 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -304,7 +304,7 @@ function writeLogFile (cb) {
var fs = require("graceful-fs")
, fstr = fs.createWriteStream("npm-debug.log")
, util = require("util")
- , eol = process.platform === "win32" ? "\r\n" : "\n"
+ , os = require("os")
, out = ""
log.record.forEach(function (m) {
@@ -315,7 +315,7 @@ function writeLogFile (cb) {
m.message.trim().split(/\r?\n/).map(function (line) {
return (pref + ' ' + line).trim()
}).forEach(function (line) {
- out += line + eol
+ out += line + os.EOL
})
})