Permalink
Browse files

Prefer https:// to git:// for github urls

  • Loading branch information...
1 parent 18aa070 commit 127b71552e676f40a37c52750d5a770aa4f6e57a @isaacs isaacs committed Jul 26, 2011
Showing with 6 additions and 1 deletion.
  1. +5 −0 lib/submodule.js
  2. +1 −1 package.json
View
@@ -40,6 +40,11 @@ function submodule_ (pkg, cb) {
|| !pkg.repository.url) {
return cb(new Error(pkg._id + ": No git repository listed"))
}
+
+ // prefer https:// github urls
+ pkg.repository.url = pkg.repository.url
+ .replace(/^(git:\/\/)?(git@)?github.com[:\/]/, "https://github.com/")
+
// first get the list of submodules, and update if it's already there.
getSubmodules(function (er, modules) {
if (er) return cb(er)
View
@@ -8,7 +8,7 @@
, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)"
, "repository" :
{ "type" : "git"
- , "url" : "git://github.com/isaacs/npm.git"
+ , "url" : "https://github.com/isaacs/npm.git"
}
, "bugs" :
{ "mail" : "npm-@googlegroups.com"

0 comments on commit 127b715

Please sign in to comment.