From 8f9d4848afc177d4c758a4563da56b58db33949b Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 2 Oct 2011 17:17:35 -0700 Subject: Only open github issues page if it's a github repo --- lib/bugs.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/bugs.js') 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) } } -- cgit v1.2.3