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_cellar(formula)
|
||||||
sandbox.allow_write_xcode
|
sandbox.allow_write_xcode
|
||||||
sandbox.allow_write_path HOMEBREW_PREFIX
|
sandbox.allow_write_path HOMEBREW_PREFIX
|
||||||
sandbox.deny_write_homebrew_library
|
sandbox.deny_write_homebrew_repository
|
||||||
sandbox.exec(*args)
|
sandbox.exec(*args)
|
||||||
else
|
else
|
||||||
exec(*args)
|
exec(*args)
|
||||||
|
|||||||
@ -84,10 +84,14 @@ class Sandbox
|
|||||||
allow_write_path formula.logs
|
allow_write_path formula.logs
|
||||||
end
|
end
|
||||||
|
|
||||||
def deny_write_homebrew_library
|
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_LIBRARY
|
||||||
deny_write_path HOMEBREW_REPOSITORY/".git"
|
deny_write_path HOMEBREW_REPOSITORY/".git"
|
||||||
deny_write HOMEBREW_BREW_FILE
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def exec(*args)
|
def exec(*args)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user