diagnostic: fix autoconf check
Xcode can only provide autotools if it is installed, thus check that first. Skipping this check will try to compare a `nil` Xcode version to 4.3, the first version of Xcode to not provide autotools. Fixes Homebrew/homebrew#48208. Closes Homebrew/homebrew#48278. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
This commit is contained in:
parent
4ffe25adc8
commit
026363e1ed
@ -1044,6 +1044,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
def check_for_autoconf
|
||||
return unless MacOS::Xcode.installed?
|
||||
return unless MacOS::Xcode.provides_autotools?
|
||||
|
||||
autoconf = which("autoconf")
|
||||
|
||||
@ -205,6 +205,7 @@ class DiagnosticChecksTest < Homebrew::TestCase
|
||||
end
|
||||
|
||||
def test_check_for_autoconf
|
||||
MacOS::Xcode.stubs(:installed?).returns true
|
||||
MacOS::Xcode.stubs(:provides_autotools?).returns true
|
||||
mktmpdir do |path|
|
||||
file = "#{path}/autoconf"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user