move privledged_uid to method in doctor
This commit is contained in:
parent
9f2c773ed6
commit
8a5ad08dc8
|
@ -3,13 +3,8 @@ class Cask::CLI::Doctor
|
|||
fq_default_tap = notfound_string
|
||||
alt_taps = notfound_string
|
||||
default_cask_count = notfound_string
|
||||
privileged_uid = notfound_string
|
||||
homebrew_origin = notfound_string
|
||||
|
||||
begin
|
||||
privileged_uid = Process.euid == 0 ? "Yes #{error_string 'warning: not recommended'}" : 'No'
|
||||
rescue StandardError; end
|
||||
|
||||
begin
|
||||
fq_default_tap = HOMEBREW_REPOSITORY.join 'Library', 'Taps', Cask.default_tap
|
||||
rescue StandardError; end
|
||||
|
@ -70,6 +65,14 @@ class Cask::CLI::Doctor
|
|||
ENV.keys.grep(/^(?:LC_\S+|LANG|LANGUAGE)\Z/).collect_concat { |v| %Q{#{v}="#{ENV[v]}"} }.sort
|
||||
end
|
||||
|
||||
def self.privileged_uid
|
||||
privileged_uid = notfound_string
|
||||
begin
|
||||
privileged_uid = Process.euid == 0 ? "Yes #{error_string 'warning: not recommended'}" : 'No'
|
||||
rescue StandardError; end
|
||||
privileged_uid
|
||||
end
|
||||
|
||||
def self.none_string
|
||||
'<NONE>'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue