Fix macOS version comparison

This commit is contained in:
Sorin Ionescu 2016-11-26 13:59:55 -05:00
parent d4f8e2fa18
commit 282c0a30b6

View File

@ -256,7 +256,7 @@ module OS
return MacOS::Xcode.version if MacOS::Xcode.installed? && Xcode::Version.new(MacOS::Xcode.version) < "3.0" return MacOS::Xcode.version if MacOS::Xcode.installed? && Xcode::Version.new(MacOS::Xcode.version) < "3.0"
[MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id| [MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id|
if Xcode::Version.new(MacOS.version) >= :mavericks.to_s if MacOS.version >= :mavericks
next unless File.exist?("#{MAVERICKS_PKG_PATH}/usr/bin/clang") next unless File.exist?("#{MAVERICKS_PKG_PATH}/usr/bin/clang")
end end
version = MacOS.pkgutil_info(id)[/version: (.+)$/, 1] version = MacOS.pkgutil_info(id)[/version: (.+)$/, 1]