Merge pull request #3780 from MikeMcQuaid/xcode_req_version

xcode_requirement: handle nil @version.
This commit is contained in:
Mike McQuaid 2018-02-09 20:35:19 +00:00 committed by GitHub
commit 646d696135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ class XcodeRequirement < Requirement
A full installation of Xcode.app#{version} is required to compile this software. A full installation of Xcode.app#{version} is required to compile this software.
Installing just the Command Line Tools is not sufficient. Installing just the Command Line Tools is not sufficient.
EOS EOS
if Version.new(MacOS::Xcode.latest_version) < Version.new(@version) if @version && Version.new(MacOS::Xcode.latest_version) < Version.new(@version)
message + <<~EOS message + <<~EOS
Xcode#{version} cannot be installed on macOS #{MacOS.version}. Xcode#{version} cannot be installed on macOS #{MacOS.version}.
You must upgrade your version of macOS. You must upgrade your version of macOS.