mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
os/mac/diagnostic: prevent some double diagostic failures
This commit is contained in:
parent
49f789d492
commit
9686ebe355
@ -433,9 +433,13 @@ module Homebrew
|
|||||||
locator = MacOS.sdk_locator
|
locator = MacOS.sdk_locator
|
||||||
|
|
||||||
source = if locator.source == :clt
|
source = if locator.source == :clt
|
||||||
|
return if MacOS::CLT.below_minimum_version? # Handled by other diagnostics.
|
||||||
|
|
||||||
update_instructions = MacOS::CLT.update_instructions
|
update_instructions = MacOS::CLT.update_instructions
|
||||||
"Command Line Tools (CLT)"
|
"Command Line Tools (CLT)"
|
||||||
else
|
else
|
||||||
|
return if MacOS::Xcode.below_minimum_version? # Handled by other diagnostics.
|
||||||
|
|
||||||
update_instructions = MacOS::Xcode.update_instructions
|
update_instructions = MacOS::Xcode.update_instructions
|
||||||
"Xcode"
|
"Xcode"
|
||||||
end
|
end
|
||||||
|
@ -47,6 +47,8 @@ describe Homebrew::Diagnostic::Checks do
|
|||||||
before do
|
before do
|
||||||
allow(DevelopmentTools).to receive(:installed?).and_return(true)
|
allow(DevelopmentTools).to receive(:installed?).and_return(true)
|
||||||
allow(OS::Mac).to receive(:version).and_return(macos_version)
|
allow(OS::Mac).to receive(:version).and_return(macos_version)
|
||||||
|
allow(OS::Mac::CLT).to receive(:below_minimum_version?).and_return(false)
|
||||||
|
allow(OS::Mac::Xcode).to receive(:below_minimum_version?).and_return(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "doesn't trigger when SDK root is not needed" do
|
it "doesn't trigger when SDK root is not needed" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user