Merge pull request #5243 from vangorden/check-umask-in-doctor

Check if umask is 000 in brew doctor
This commit is contained in:
Mike McQuaid 2018-11-04 10:23:50 +00:00 committed by GitHub
commit 511a6a1e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,17 @@ module Homebrew
#{Utils::Shell.prepend_variable_in_profile("XDG_DATA_DIRS", HOMEBREW_PREFIX/"share")}
EOS
end
def check_umask_not_zero
return unless File.umask.zero?
<<~EOS
umask is currently set to 000. Directories created by Homebrew cannot
be world-writable. This issue can be resolved by adding umask 002 to
your #{shell_profile}
echo 'umask 002' >> #{shell_profile}
EOS
end
end
end
end