summaryrefslogtreecommitdiff
path: root/deps/npm/lib/cache/add-remote-git.js
diff options
context:
space:
mode:
authorJulien Gilli <julien.gilli@joyent.com>2015-03-16 15:55:17 -0700
committerJulien Gilli <julien.gilli@joyent.com>2015-03-16 15:55:17 -0700
commitae58fc407f916b2abb164453a5b09273c543dbc3 (patch)
tree4a16fe73f996a54f34cfb553b2995d16c1375b7f /deps/npm/lib/cache/add-remote-git.js
parent2b64132101f179c30957e3c5f16fc47a8ec942e1 (diff)
parenteb2764a9452baa7cba2d98dc34fa00fc776b0a12 (diff)
downloadnode-merge-review.tar.gz
Merge remote-tracking branch 'upstream/v0.12'merge-review
Diffstat (limited to 'deps/npm/lib/cache/add-remote-git.js')
-rw-r--r--deps/npm/lib/cache/add-remote-git.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js
index c829a4fe6..974c158f9 100644
--- a/deps/npm/lib/cache/add-remote-git.js
+++ b/deps/npm/lib/cache/add-remote-git.js
@@ -188,7 +188,9 @@ function resolveHead (p, u, co, origUrl, cb) {
parsed.hash = stdout
var resolved = url.format(parsed)
- if (parsed.protocol !== "git:") resolved = "git+" + resolved
+ if (!/^git[+:]/.test(parsed.protocol)) {
+ resolved = "git+" + resolved
+ }
// https://github.com/npm/npm/issues/3224
// node incorrectly sticks a / at the start of the path We know that the