Skip to content
Snippets Groups Projects
Commit e158b5e4 authored by Xu Cheng's avatar Xu Cheng
Browse files

pull: fix --legacy for legacy-homebrew repo

parent eec323ae
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment