Class: Homebrew::Cmd::UninstallCmd Private
- Inherits:
-
AbstractCommand
- Object
- AbstractCommand
- Homebrew::Cmd::UninstallCmd
- Defined in:
- cmd/uninstall.rb,
sorbet/rbi/dsl/homebrew/cmd/uninstall_cmd.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
- #args ⇒ Homebrew::Cmd::UninstallCmd::Args private
- #run ⇒ void private
Methods inherited from AbstractCommand
command, command_name, dev_cmd?, #initialize, parser, ruby_cmd?
Constructor Details
This class inherits a constructor from Homebrew::AbstractCommand
Instance Method Details
#args ⇒ Homebrew::Cmd::UninstallCmd::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/uninstall_cmd.rbi', line 10 def args; end |
#run ⇒ void
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.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'cmd/uninstall.rb', line 43 def run all_kegs, casks = args.named.to_kegs_to_casks( ignore_unavailable: args.force?, all_kegs: args.force?, ) # If ignore_unavailable is true and the named args # are a series of invalid kegs and casks, # #to_kegs_to_casks will return empty arrays. return if all_kegs.blank? && casks.blank? kegs_by_rack = all_kegs.group_by(&:rack) Uninstall.uninstall_kegs( kegs_by_rack, casks:, force: args.force?, ignore_dependencies: args.ignore_dependencies?, named_args: args.named, ) if args.zap? casks.each do |cask| odebug "Zapping Cask #{cask}" raise Cask::CaskNotInstalledError, cask if !cask.installed? && !args.force? Cask::Installer.new(cask, verbose: args.verbose?, force: args.force?).zap end else Cask::Uninstall.uninstall_casks( *casks, verbose: args.verbose?, force: args.force?, ) end if ENV["HOMEBREW_AUTOREMOVE"].present? opoo "HOMEBREW_AUTOREMOVE is now a no-op as it is the default behaviour. " \ "Set HOMEBREW_NO_AUTOREMOVE=1 to disable it." end Cleanup.autoremove unless Homebrew::EnvConfig.no_autoremove? end |