Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -545,7 +545,7 @@ function addNamed (name, x, data, cb_) { | |
if (iF.length > 1) return | ||
|
||
function cb (er, data) { | ||
if (data) data._from = k | ||
if (data && !data._fromGithub) data._from = k | ||
unlock(k, function () { | ||
var c | ||
while (c = iF.shift()) c(er, data) | ||
|
@@ -753,7 +753,7 @@ function addLocal (p, name, cb_) { | |
log.error("addLocal", "Could not install %s", p) | ||
return cb_(er) | ||
} | ||
data._from = p | ||
if (data && !data._fromGithub) data._from = p | ||
return cb_(er, data) | ||
}) | ||
} | ||
|
@@ -777,17 +777,14 @@ function addLocal (p, name, cb_) { | |
} | ||
|
||
function maybeGithub (p, name, er, cb) { | ||
var u = "https://github.com/" + p | ||
var u = "git://github.com/" + p | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
edef1c
Contributor
|
||
, 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 addRemoteTarball(u, null, name, function (er2, data) { | ||
|
||
return addRemoteGit(u, up, name, function (er2, data) { | ||
if (er2) return cb(er) | ||
data._from = u | ||
data._fromGithub = true | ||
return cb(null, data) | ||
}) | ||
} | ||
|
is there a specific reason why the ability to install from a GH tarball was removed?