aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-04-25 14:34:27 +0100
committerMike McQuaid2017-04-25 14:34:27 +0100
commit4971855e9b515e1bf6f52b9fcb2bab07af0e2cfd (patch)
tree1f20b97415ee365fbbe2cc96b699ab4e5f6844c1
parent3589e24df03adc074081549229d8cc244643eee4 (diff)
downloadbrew-4971855e9b515e1bf6f52b9fcb2bab07af0e2cfd.tar.bz2
software_spec: process macOS versions on Linux.
This module doesn't actually have any behaviour that's problematic at runtime on Linux so we may as well use it to properly sort macOS versions there.
-rw-r--r--Library/Homebrew/software_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index 1d2e4bf64..be851ca16 100644
--- a/Library/Homebrew/software_spec.rb
+++ b/Library/Homebrew/software_spec.rb
@@ -8,6 +8,7 @@ require "dependency_collector"
require "utils/bottles"
require "patch"
require "compilers"
+require "os/mac/version"
class SoftwareSpec
extend Forwardable
@@ -338,8 +339,8 @@ class BottleSpecification
tags = collector.keys.sort_by do |tag|
# Sort non-MacOS tags below MacOS tags.
begin
- MacOS::Version.from_symbol tag
- rescue
+ OS::Mac::Version.from_symbol tag
+ rescue ArgumentError
"0.#{tag}"
end
end