diff options
author | Matt Lunn <matt@mattlunn.me.uk> | 2013-06-02 02:35:10 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-06-17 19:07:43 +0400 |
commit | 54e0f439cdecb286a001a42c30d99b401efc1256 (patch) | |
tree | 46cc1354ae50faec15add47db50e9c51a9c4bc44 /lib/update.js | |
parent | 83ce47740e9cd477d064acaadcb15448bc5f2c18 (diff) |
Use git repo or tarball as update source
Diffstat (limited to 'lib/update.js')
-rw-r--r-- | lib/update.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/update.js b/lib/update.js index 46d32678e..68e01955a 100644 --- a/lib/update.js +++ b/lib/update.js @@ -27,12 +27,16 @@ function update (args, cb) { if (er) return cb(er) asyncMap(outdated, function (ww, cb) { - // [[ dir, dep, has, want ]] + // [[ dir, dep, has, want, req ]] var where = ww[0] , dep = ww[1] , want = ww[3] , what = dep + "@" + want + , req = ww[4] + , url = require('url') + // use the initial installation method (repo, tar, git) for updating + if (url.parse(req).protocol) what = req npm.commands.install(where, what, cb) }, cb) }) |