Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 127b71552e676f40a37c52750d5a770aa4f6e57a 1 parent 18aa070
@isaacs isaacs authored
Showing with 6 additions and 1 deletion.
  1. +5 −0 lib/submodule.js
  2. +1 −1  package.json
View
5 lib/submodule.js
@@ -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
2  package.json
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.