aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/bottles.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-16 21:11:48 -0500
committerJack Nagel2014-07-16 21:11:48 -0500
commitecc5bbc50dde4a3043e9a2b499935cb772f5b1b8 (patch)
treef05019b6a94fad7ea7e79d39b313c6fcf47035a9 /Library/Homebrew/bottles.rb
parentbd8b510b174f92f5d268897094cabf003ca57ef7 (diff)
downloadhomebrew-ecc5bbc50dde4a3043e9a2b499935cb772f5b1b8.tar.bz2
Don't raise when converting the tag to a version fails
Diffstat (limited to 'Library/Homebrew/bottles.rb')
-rw-r--r--Library/Homebrew/bottles.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb
index cc29c54fd..0f5d36963 100644
--- a/Library/Homebrew/bottles.rb
+++ b/Library/Homebrew/bottles.rb
@@ -114,10 +114,16 @@ class BottleCollector
# so the same bottle can target multiple OSs.
# Not used in core, used in taps.
def find_or_later_tag(tag)
+ begin
+ tag_version = MacOS::Version.from_symbol(tag)
+ rescue ArgumentError
+ return
+ end
+
keys.find do |key|
if key.to_s.end_with?("_or_later")
later_tag = key.to_s[/(\w+)_or_later$/, 1].to_sym
- MacOS::Version.from_symbol(later_tag) <= MacOS::Version.from_symbol(tag)
+ MacOS::Version.from_symbol(later_tag) <= tag_version
end
end
end