diff options
Diffstat (limited to 'Library/Homebrew/sandbox.rb')
| -rw-r--r-- | Library/Homebrew/sandbox.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/sandbox.rb b/Library/Homebrew/sandbox.rb index ab9f5f16f..3affa4f95 100644 --- a/Library/Homebrew/sandbox.rb +++ b/Library/Homebrew/sandbox.rb @@ -8,6 +8,18 @@ class Sandbox OS.mac? && File.executable?(SANDBOX_EXEC) end + # there are times the sandbox cannot be used. + def self.auto_disable? + @auto_disable ||= ARGV.interactive? || ARGV.debug? + end + + def self.print_autodisable_warning + unless @print_autodisable_warning + opoo "The sandbox cannot be used in debug or interactive mode." + @print_autodisable_warning = true + end + end + def initialize @profile = SandboxProfile.new end |
