Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use the archives from GitHub.

Uses GitHub-provided tars instead of using git directly. This also makes
providing refs work for GitHub deps.
  • Loading branch information...
commit 115d67d0dbbf4b3cab3ef5c2d93cb52a6e795f81 1 parent 3769fe2
@nathan7 nathan7 authored isaacs committed
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/cache.js
View
10 lib/cache.js
@@ -664,10 +664,16 @@ function addLocal (p, name, cb_) {
}
function maybeGithub (p, name, er, cb) {
- var u = "git://github.com/" + p
+ var u = "https://github.com/" + p
, up = url.parse(u)
+ if (up.hash && up.hash[0] === "#")
+ up.hash = up.hash.slice(1)
+
+ var ref = encodeURIComponent(up.hash || "master")
+ up.pathname = path.join(up.pathname, "tarball", ref).replace(/\\/g, "/")
+ u = url.format(up)
log.info("maybeGithub", "Attempting to fetch %s from %s", p, u)
- return addRemoteGit(u, up, name, function (er2, data) {
+ return addRemoteTarball(u, null, name, function (er2, data) {
if (er2) return cb(er)
return cb(null, data)
})
Please sign in to comment.
Something went wrong with that request. Please try again.