mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Split out os-specific cask software version checks
This commit is contained in:
parent
dd04fb5ab6
commit
031160936f
@ -910,22 +910,6 @@ module Homebrew
|
|||||||
|
|
||||||
def check_cask_software_versions
|
def check_cask_software_versions
|
||||||
add_info "Homebrew Version", HOMEBREW_VERSION
|
add_info "Homebrew Version", HOMEBREW_VERSION
|
||||||
add_info "macOS", MacOS.full_version
|
|
||||||
add_info "SIP", begin
|
|
||||||
csrutil = "/usr/bin/csrutil"
|
|
||||||
if File.executable?(csrutil)
|
|
||||||
Open3.capture2(csrutil, "status")
|
|
||||||
.first
|
|
||||||
.gsub("This is an unsupported configuration, likely to break in " \
|
|
||||||
"the future and leave your machine in an unknown state.", "")
|
|
||||||
.gsub("System Integrity Protection status: ", "")
|
|
||||||
.delete("\t.")
|
|
||||||
.capitalize
|
|
||||||
.strip
|
|
||||||
else
|
|
||||||
"N/A"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
@ -189,6 +189,13 @@ module OS
|
|||||||
are prone to breaking when GCC is updated. You should `brew reinstall` these formulae:
|
are prone to breaking when GCC is updated. You should `brew reinstall` these formulae:
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check_cask_software_versions
|
||||||
|
super
|
||||||
|
add_info "Linux", OS::Linux.os_version
|
||||||
|
|
||||||
|
nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -496,6 +496,28 @@ module OS
|
|||||||
#{installation_instructions}
|
#{installation_instructions}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check_cask_software_versions
|
||||||
|
super
|
||||||
|
add_info "macOS", MacOS.full_version
|
||||||
|
add_info "SIP", begin
|
||||||
|
csrutil = "/usr/bin/csrutil"
|
||||||
|
if File.executable?(csrutil)
|
||||||
|
Open3.capture2(csrutil, "status")
|
||||||
|
.first
|
||||||
|
.gsub("This is an unsupported configuration, likely to break in " \
|
||||||
|
"the future and leave your machine in an unknown state.", "")
|
||||||
|
.gsub("System Integrity Protection status: ", "")
|
||||||
|
.delete("\t.")
|
||||||
|
.capitalize
|
||||||
|
.strip
|
||||||
|
else
|
||||||
|
"N/A"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user