cask doctor: sip status
This commit is contained in:
parent
df08bf2b09
commit
e870c1783f
@ -12,6 +12,7 @@ module Hbc
|
|||||||
def run
|
def run
|
||||||
ohai "Homebrew-Cask Version", Hbc.full_version
|
ohai "Homebrew-Cask Version", Hbc.full_version
|
||||||
ohai "macOS", MacOS.full_version
|
ohai "macOS", MacOS.full_version
|
||||||
|
ohai "SIP", self.class.check_sip
|
||||||
ohai "Java", SystemConfig.describe_java
|
ohai "Java", SystemConfig.describe_java
|
||||||
ohai "Homebrew-Cask Install Location", self.class.render_install_location
|
ohai "Homebrew-Cask Install Location", self.class.render_install_location
|
||||||
ohai "Homebrew-Cask Staging Location", self.class.render_staging_location(Hbc.caskroom)
|
ohai "Homebrew-Cask Staging Location", self.class.render_staging_location(Hbc.caskroom)
|
||||||
@ -37,6 +38,15 @@ module Hbc
|
|||||||
(self.class.locale_variables + environment_variables).sort.each(&self.class.method(:render_env_var))
|
(self.class.locale_variables + environment_variables).sort.each(&self.class.method(:render_env_var))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.check_sip
|
||||||
|
csrutil = "/usr/bin/csrutil"
|
||||||
|
return "N/A" unless File.executable?(csrutil)
|
||||||
|
Open3.capture2(csrutil, "status")[0]
|
||||||
|
.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
|
||||||
|
end
|
||||||
|
|
||||||
def self.locale_variables
|
def self.locale_variables
|
||||||
ENV.keys.grep(/^(?:LC_\S+|LANG|LANGUAGE)\Z/).sort
|
ENV.keys.grep(/^(?:LC_\S+|LANG|LANGUAGE)\Z/).sort
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user