summaryrefslogtreecommitdiff
path: root/deps/npm/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-06-06 14:44:48 -0700
committerisaacs <i@izs.me>2013-06-06 14:44:48 -0700
commit4d13fcf4811f5dd680a12df940ed7054cf044221 (patch)
tree0157f44191368961a6600e75252031a8484e1c9b /deps/npm/lib
parente0519ace315c7ce14278d5eaab8d1d72a0a0a054 (diff)
downloadnode-new-4d13fcf4811f5dd680a12df940ed7054cf044221.tar.gz
npm: Upgrade to 1.2.27
Diffstat (limited to 'deps/npm/lib')
-rw-r--r--deps/npm/lib/cache.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index 90d8226d0b..9f8819e68c 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -520,6 +520,16 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
var parsed = url.parse(origUrl)
parsed.hash = stdout
resolved = url.format(parsed)
+
+ // https://github.com/isaacs/npm/issues/3224
+ // node incorrectly sticks a / at the start of the path
+ // We know that the host won't change, so split and detect this
+ var spo = origUrl.split(parsed.host)
+ var spr = resolved.split(parsed.host)
+ if (spo[1].charAt(0) === ':' && spr[1].charAt(0) === '/')
+ spr[1] = spr[1].slice(1)
+ resolved = spr.join(parsed.host)
+
log.verbose('resolved git url', resolved)
next()
})