Class: Homebrew::Cmd::Bundle::RemoveSubcommand Private

Inherits:
AbstractSubcommand show all
Defined in:
bundle/subcommand/remove.rb,
sorbet/rbi/dsl/homebrew/cmd/bundle/remove_subcommand.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

Modules: Args

Instance Attribute Summary

Attributes inherited from AbstractSubcommand

#cleanup, #context, #quiet, #targets

Instance Method Summary collapse

Methods inherited from AbstractSubcommand

args_module, command, define, define_all, #initialize, subcommand_name, subcommands_for

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_cannot_install, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning

Constructor Details

This class inherits a constructor from Homebrew::AbstractSubcommand

Instance Method Details

#argsT.all(Homebrew::Cmd::Bundle::Args, Homebrew::Cmd::Bundle::RemoveSubcommand::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/bundle/remove_subcommand.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:



37
38
39
40
41
42
43
44
45
46
47
# File 'bundle/subcommand/remove.rb', line 37

def run
  selected_types = context.selected_types(args)
  raise UsageError, "`remove` supports only one type of entry at a time." if selected_types.count != 1

  Homebrew::Bundle::Remover.remove(
    *args.named,
    type:   selected_types.first,
    global: context.global,
    file:   context.file,
  )
end