Merge pull request #1680 from MikeMcQuaid/post-install-sandbox-prefix

postinstall: don't allow writes to prefix itself.
This commit is contained in:
Mike McQuaid 2016-12-20 09:57:37 +00:00 committed by GitHub
commit e3844719bc

View File

@ -37,8 +37,10 @@ module Homebrew
sandbox.allow_write_log(formula)
sandbox.allow_write_xcode
sandbox.deny_write_homebrew_repository
sandbox.allow_write_path HOMEBREW_PREFIX
sandbox.allow_write_cellar(formula)
Keg::TOP_LEVEL_DIRECTORIES.each do |dir|
sandbox.allow_write_path "#{HOMEBREW_PREFIX}/#{dir}"
end
sandbox.exec(*args)
else
exec(*args)