Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Prepend the git+ to git urls if not found in _resolved
Browse files Browse the repository at this point in the history
Fix #5752
Fix #6013
  • Loading branch information
isaacs committed Aug 21, 2014
1 parent e4e1223 commit 6c47201
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cache/add-remote-git.js
Expand Up @@ -182,6 +182,10 @@ function archiveGitRemote (p, u, co, origUrl, cb) {
parsed.hash = stdout parsed.hash = stdout
resolved = url.format(parsed) resolved = url.format(parsed)


if (parsed.proto !== "git:") {
resolved = "git+" + resolved
}

// https://github.com/npm/npm/issues/3224 // https://github.com/npm/npm/issues/3224
// node incorrectly sticks a / at the start of the path // node incorrectly sticks a / at the start of the path
// We know that the host won't change, so split and detect this // We know that the host won't change, so split and detect this
Expand Down

0 comments on commit 6c47201

Please sign in to comment.