Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-03-20 03:15:37 +0300
committerForrest L Norvell <forrest@npmjs.com>2015-03-20 03:15:37 +0300
commit63313eb0c37891c355546fd1093010c8a0c3cd81 (patch)
tree31628627b6961d1952756bdc4161c96b28f73167 /lib
parent3ed41bf64a1bb752bb3155c74dd6ffbbd28c89c9 (diff)
realize-package-specifier@2.2.0
Push the new npm-package-arg logic further into the caching logic. Doesn't quite handle GitHub URLs correctly yet. That will require depending on hosted-git-info directly.
Diffstat (limited to 'lib')
-rw-r--r--lib/cache.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/cache.js b/lib/cache.js
index 357063551..b5a9fae0e 100644
--- a/lib/cache.js
+++ b/lib/cache.js
@@ -300,8 +300,12 @@ function add (args, where, cb) {
case "git":
addRemoteGit(p.spec, false, cb)
break
- case "github":
- maybeGithub(p.spec, cb)
+ case "hosted":
+ if (p.hosted.type === "github") {
+ maybeGithub(p.rawSpec, cb)
+ } else {
+ addRemoteGit(p.spec, false, cb)
+ }
break
default:
if (p.name) return addNamed(p.name, p.spec, null, cb)