From a79721e59d87e808b400fb913a7ff6d9851a94ae Mon Sep 17 00:00:00 2001 From: Eashwar Ranganathan Date: Mon, 4 Feb 2013 17:46:22 -0800 Subject: [PATCH] brew-pull: fix third-party taps Closes Homebrew/homebrew#17588. Signed-off-by: Mike McQuaid --- Library/Contributions/cmds/brew-pull.rb | 6 +++--- Library/Homebrew/global.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Contributions/cmds/brew-pull.rb b/Library/Contributions/cmds/brew-pull.rb index b202094825..6a055f77b3 100755 --- a/Library/Contributions/cmds/brew-pull.rb +++ b/Library/Contributions/cmds/brew-pull.rb @@ -6,7 +6,7 @@ require 'formula' def tap arg match = arg.match(%r[homebrew-(\w+)/]) - match[1] if match + match[1].downcase if match end if ARGV.empty? @@ -31,7 +31,7 @@ ARGV.named.each do|arg| end if tap url - Dir.chdir HOMEBREW_REPOSITORY/"Library/Taps/homebrew-#{tap url}" + Dir.chdir HOMEBREW_REPOSITORY/"Library/Taps/#{url_match[1].downcase}-#{tap url}" else Dir.chdir HOMEBREW_REPOSITORY end @@ -57,7 +57,7 @@ ARGV.named.each do|arg| safe_system 'git', *patch_args - issue = arg.to_i > 0 ? arg.to_i : url_match[3] + issue = arg.to_i > 0 ? arg.to_i : url_match[4] if issue and not ARGV.include? '--clean' ohai "Patch closes issue ##{issue}" message = `git log HEAD^.. --format=%B` diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 402b9e6644..de08f92671 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -88,7 +88,7 @@ end require 'metafiles' FORMULA_META_FILES = Metafiles.new ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/troubleshooting" -HOMEBREW_PULL_URL_REGEX = 'https:\/\/github.com\/\w+\/homebrew(-\w+)?\/(pull\/(\d+)|commit\/\w{4,40})' +HOMEBREW_PULL_URL_REGEX = 'https:\/\/github.com\/(\w+)\/homebrew(-\w+)?\/(pull\/(\d+)|commit\/\w{4,40})' unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT'] $:.unshift(File.expand_path("#{__FILE__}/../compat"))