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.
This commit is contained in:
Mike McQuaid 2017-04-25 14:34:27 +01:00
parent 3589e24df0
commit 4971855e9b

View File

@ -8,6 +8,7 @@ require "dependency_collector"
require "utils/bottles" require "utils/bottles"
require "patch" require "patch"
require "compilers" require "compilers"
require "os/mac/version"
class SoftwareSpec class SoftwareSpec
extend Forwardable extend Forwardable
@ -338,8 +339,8 @@ class BottleSpecification
tags = collector.keys.sort_by do |tag| tags = collector.keys.sort_by do |tag|
# Sort non-MacOS tags below MacOS tags. # Sort non-MacOS tags below MacOS tags.
begin begin
MacOS::Version.from_symbol tag OS::Mac::Version.from_symbol tag
rescue rescue ArgumentError
"0.#{tag}" "0.#{tag}"
end end
end end