diff options
author | isaacs <i@izs.me> | 2013-06-07 01:18:40 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-06-07 01:18:40 +0400 |
commit | 96cec36f828b55caf1784f331fd6656f71f5b681 (patch) | |
tree | 68b7630c33499180be66671e1dc59b35dc4c18a0 | |
parent | 54e68d429e1d01e89b2077d0e579d9d7b87f241e (diff) |
cache: Handle cases where git url contains host more than once
Slight fixup for #3224
-rw-r--r-- | lib/cache.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/cache.js b/lib/cache.js index 7a658a78e..9f8819e68 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -527,7 +527,8 @@ function archiveGitRemote (p, u, co, origUrl, cb) { var spo = origUrl.split(parsed.host) var spr = resolved.split(parsed.host) if (spo[1].charAt(0) === ':' && spr[1].charAt(0) === '/') - resolved = spr[0] + parsed.host + spr[1].slice(1) + spr[1] = spr[1].slice(1) + resolved = spr.join(parsed.host) log.verbose('resolved git url', resolved) next() |