diff --git a/bin/git-bb-open b/bin/git-bb-open index 7ade957..810c5cf 100755 --- a/bin/git-bb-open +++ b/bin/git-bb-open @@ -13,10 +13,11 @@ def constructURL remote = git_remote() bbloc = remote.index('bitbucket.org') if not bbloc - puts "git-bb-open only works for repositories with their origin remote on bitbucket.org" - exit 1 + host = repo_url + else + host = remote[bbloc..-5].sub(':','/') end - url_prefix="https://#{remote[bbloc..-5].sub(':','/')}/src/#{git_commit}" + url_prefix="https://#{host}/src/#{git_commit}" root = Pathname.new(git_root()) pwd = Pathname.new(Dir.pwd()) if ARGV.length == 1