Merge pull request #1101 from MikeMcQuaid/sandbox-repository
sandbox: tweak HOMEBREW_REPOSITORY handling.
This commit is contained in:
commit
597a92af44
@ -36,7 +36,7 @@ module Homebrew
|
||||
sandbox.allow_write_cellar(formula)
|
||||
sandbox.allow_write_xcode
|
||||
sandbox.allow_write_path HOMEBREW_PREFIX
|
||||
sandbox.deny_write_homebrew_library
|
||||
sandbox.deny_write_homebrew_repository
|
||||
sandbox.exec(*args)
|
||||
else
|
||||
exec(*args)
|
||||
|
||||
@ -84,10 +84,14 @@ class Sandbox
|
||||
allow_write_path formula.logs
|
||||
end
|
||||
|
||||
def deny_write_homebrew_library
|
||||
deny_write_path HOMEBREW_LIBRARY
|
||||
deny_write_path HOMEBREW_REPOSITORY/".git"
|
||||
def deny_write_homebrew_repository
|
||||
deny_write HOMEBREW_BREW_FILE
|
||||
if HOMEBREW_PREFIX.to_s != HOMEBREW_REPOSITORY.to_s
|
||||
deny_write_path HOMEBREW_REPOSITORY
|
||||
else
|
||||
deny_write_path HOMEBREW_LIBRARY
|
||||
deny_write_path HOMEBREW_REPOSITORY/".git"
|
||||
end
|
||||
end
|
||||
|
||||
def exec(*args)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user