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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-10-03 04:17:35 +0400
committerisaacs <i@izs.me>2011-10-03 04:17:35 +0400
commit8f9d4848afc177d4c758a4563da56b58db33949b (patch)
treef4060320bd32707e00d39368fc4d01b71a6f013a /lib/bugs.js
parent7814ae00806530f8c7180bc0ea88c22ceb1d5a64 (diff)
Only open github issues page if it's a github repo
Diffstat (limited to 'lib/bugs.js')
-rw-r--r--lib/bugs.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bugs.js b/lib/bugs.js
index aed731d64..39e746592 100644
--- a/lib/bugs.js
+++ b/lib/bugs.js
@@ -34,8 +34,9 @@ function bugs (args, cb) {
if (Array.isArray(repo)) repo = repo.shift()
if (repo.url) repo = repo.url
log.verbose(repo, "repository")
- if (repo) {
- return open(repo.replace(/^git(@|:\/\/)/, 'http://')
+ if (repo && repo.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) {
+ return open(repo.replace(/^git(@|:\/\/)/, "http://")
+ .replace(/^https?:\/\/github.com:/, "github.com/")
.replace(/\.git$/, '')+"/issues", cb)
}
}