diff options
| author | Xu Cheng | 2016-04-03 21:22:39 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-04-03 21:22:39 +0800 |
| commit | e158b5e4b1f9586a38b6bd8231fbe978f90e2713 (patch) | |
| tree | bad5dd60b722c0d7e8ab8954811dfbcbdb5cfe71 /Library | |
| parent | eec323aed81c14db6fd519aa734394ffe1071db8 (diff) | |
| download | brew-e158b5e4b1f9586a38b6bd8231fbe978f90e2713.tar.bz2 | |
pull: fix --legacy for legacy-homebrew repo
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/pull.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb index 06b7639bb..33868d8f7 100644 --- a/Library/Homebrew/cmd/pull.rb +++ b/Library/Homebrew/cmd/pull.rb @@ -56,10 +56,12 @@ module Homebrew elsif (api_match = arg.match HOMEBREW_PULL_API_REGEX) _, user, repo, issue = *api_match url = "https://github.com/#{user}/#{repo}/pull/#{issue}" - tap = Tap.fetch(user, repo) if repo.start_with?("homebrew-") || ARGV.include?("--legacy") + tap = Tap.fetch(user, repo) if repo.start_with?("homebrew-") + tap = CoreTap.instance if ARGV.include?("--legacy") elsif (url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX) url, user, repo, issue = *url_match - tap = Tap.fetch(user, repo) if repo.start_with?("homebrew-") || ARGV.include?("--legacy") + tap = Tap.fetch(user, repo) if repo.start_with?("homebrew-") + tap = CoreTap.instance if ARGV.include?("--legacy") else odie "Not a GitHub pull request or commit: #{arg}" end @@ -68,10 +70,6 @@ module Homebrew odie "No pull request detected!" end - if ARGV.include?("--legacy") && !tap.core_tap? - odie "--legacy can only be used for CoreTap!" - end - if tap tap.install unless tap.installed? Dir.chdir tap.path |
