diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/postinstall.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/test.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/sandbox.rb | 11 |
4 files changed, 27 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb index 337fc62be..6630afba1 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 + if Sandbox.available? && ARGV.sandbox? + if Sandbox.auto_disable? + Sandbox.print_autodisable_warning + else + Sandbox.print_sandbox_message + end end Utils.safe_fork do diff --git a/Library/Homebrew/cmd/test.rb b/Library/Homebrew/cmd/test.rb index d298452ff..7c3641426 100644 --- a/Library/Homebrew/cmd/test.rb +++ b/Library/Homebrew/cmd/test.rb @@ -35,8 +35,12 @@ module Homebrew #{f.path} ].concat(ARGV.options_only) - if Sandbox.available? && ARGV.sandbox? && Sandbox.auto_disable? - Sandbox.print_autodisable_warning + if Sandbox.available? && ARGV.sandbox? + if Sandbox.auto_disable? + Sandbox.print_autodisable_warning + else + Sandbox.print_sandbox_message + end end Utils.safe_fork do diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 355517e49..c372ba287 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -486,8 +486,12 @@ class FormulaInstaller #{formula.path} ].concat(build_argv) - if Sandbox.available? && ARGV.sandbox? && Sandbox.auto_disable? - Sandbox.print_autodisable_warning + if Sandbox.available? && ARGV.sandbox? + if Sandbox.auto_disable? + Sandbox.print_autodisable_warning + else + Sandbox.print_sandbox_message + end end Utils.safe_fork do diff --git a/Library/Homebrew/sandbox.rb b/Library/Homebrew/sandbox.rb index 3affa4f95..7ad845d5e 100644 --- a/Library/Homebrew/sandbox.rb +++ b/Library/Homebrew/sandbox.rb @@ -14,9 +14,16 @@ class Sandbox end def self.print_autodisable_warning - unless @print_autodisable_warning + unless @printed_autodisable_warning opoo "The sandbox cannot be used in debug or interactive mode." - @print_autodisable_warning = true + @printed_autodisable_warning = true + end + end + + def self.print_sandbox_message + unless @printed_sandbox_message + ohai "Using the sandbox" + @printed_sandbox_message = true end end |
