diff options
| author | Jack Nagel | 2014-07-06 13:52:04 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-06 13:52:04 -0500 |
| commit | 2d505754e7a9cd6d56d806c8f8fa8e5773e31f2a (patch) | |
| tree | bb77f1f88df5076f465288f22adeff3805b18286 /Library/Homebrew | |
| parent | 6e60b1d8c3fa1b76b6214ca6df16876b4b2f5075 (diff) | |
| download | brew-2d505754e7a9cd6d56d806c8f8fa8e5773e31f2a.tar.bz2 | |
Use Formula tap methods instead of matching the path
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cmd/info.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 23efe4b49..5308fc939 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -62,14 +62,13 @@ module Homebrew end def github_info f - if f.path.to_s =~ HOMEBREW_TAP_PATH_REGEX - user = $1 - repo = $2 - path = $3 + if f.tap? + user, repo = f.tap.split("/", 2) + path = f.path.relative_path_from(HOMEBREW_LIBRARY.join("Taps", f.tap)) else user = f.path.parent.cd { github_fork } repo = "homebrew" - path = "Library/Formula/#{f.path.basename}" + path = f.path.relative_path_from(HOMEBREW_REPOSITORY) end "https://github.com/#{user}/#{repo}/blob/master/#{path}" |
