diff options
| author | Xu Cheng | 2015-07-21 14:47:37 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-07-22 15:12:15 +0800 |
| commit | 8cebb64eec8e887b35d53fa3003c87dc1ed5eda1 (patch) | |
| tree | 5362ac0a04b9023072feee6ae6a8055550117ee7 /Library/Homebrew/cmd/postinstall.rb | |
| parent | 895983fed560a05f7080b8c0cfcb1bf19635fcc9 (diff) | |
| download | brew-8cebb64eec8e887b35d53fa3003c87dc1ed5eda1.tar.bz2 | |
auto disable sandbox for interactive shell
Closes Homebrew/homebrew#38792.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/cmd/postinstall.rb')
| -rw-r--r-- | Library/Homebrew/cmd/postinstall.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb index 1936f25ea..337fc62be 100644 --- a/Library/Homebrew/cmd/postinstall.rb +++ b/Library/Homebrew/cmd/postinstall.rb @@ -15,8 +15,12 @@ module Homebrew #{formula.path} ].concat(ARGV.options_only) + if Sandbox.available? && ARGV.sandbox? && Sandbox.auto_disable? + Sandbox.print_autodisable_warning + end + Utils.safe_fork do - if Sandbox.available? && ARGV.sandbox? + if Sandbox.available? && ARGV.sandbox? && !Sandbox.auto_disable? sandbox = Sandbox.new formula.logs.mkpath sandbox.record_log(formula.logs/"sandbox.postinstall.log") |
