From 477faf073bd0e500bbdea65239430b6a6bd3b54b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 18 Dec 2016 15:31:15 -0800 Subject: [PATCH] Never trigger too old CLT check on <10.7. While we fake a CLT for these versions they never shipped with the CLT so cannot update it. --- Library/Homebrew/extend/os/mac/diagnostic.rb | 4 ++-- Library/Homebrew/os/mac/xcode.rb | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 157e7982bf..55be7b1918 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -116,7 +116,7 @@ module Homebrew def check_xcode_minimum_version return unless MacOS::Xcode.installed? - return unless MacOS::Xcode.minimum_version? + return unless MacOS::Xcode.below_minimum_version? <<-EOS.undent Your Xcode (#{MacOS::Xcode.version}) is too outdated. @@ -127,7 +127,7 @@ module Homebrew def check_clt_minimum_version return unless MacOS::CLT.installed? - return unless MacOS::CLT.minimum_version? + return unless MacOS::CLT.below_minimum_version? <<-EOS.undent Your Command Line Tools are too outdated. diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index bc1d66ef83..4ab863a5dd 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -32,7 +32,7 @@ module OS end end - def minimum_version? + def below_minimum_version? version < minimum_version end @@ -231,11 +231,16 @@ module OS end end - def minimum_version? + def below_minimum_version? + # Lion was the first version of OS X to ship with a CLT + return false if MacOS.version < :lion version < minimum_version end def outdated? + # Lion was the first version of OS X to ship with a CLT + return false if MacOS.version < :lion + if MacOS.version >= :mavericks version = Utils.popen_read("#{MAVERICKS_PKG_PATH}/usr/bin/clang --version") else