Check if umask is 000 in brew doctor

This commit is contained in:
nvg 2018-11-02 15:03:54 -07:00
parent ca1315e0a9
commit 0ca61d55ae

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