diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2015-03-20 03:15:37 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-03-20 03:15:37 +0300 |
commit | 63313eb0c37891c355546fd1093010c8a0c3cd81 (patch) | |
tree | 31628627b6961d1952756bdc4161c96b28f73167 /lib | |
parent | 3ed41bf64a1bb752bb3155c74dd6ffbbd28c89c9 (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.js | 8 |
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) |