Class: Homebrew::Cmd::SandboxExec Private

Inherits:
AbstractCommand show all
Defined in:
cmd/sandbox-exec.rb,
sorbet/rbi/dsl/homebrew/cmd/sandbox_exec.rbi

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser, ruby_cmd?

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_upgradable

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::Cmd::SandboxExec::Args

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



10
# File 'sorbet/rbi/dsl/homebrew/cmd/sandbox_exec.rbi', line 10

def args; end

#runvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

Raises:



27
28
29
30
31
32
33
34
35
36
# File 'cmd/sandbox-exec.rb', line 27

def run
  writable_path = args.named.first
  raise UsageError, "`sandbox-exec` requires a writable path." unless writable_path

  Sandbox.run_command(
    *args.named.drop(1),
    writable_path:,
    deny_network:  args.deny_network?,
  )
end