Class: Cask::Uninstall Private

Inherits:
Object show all
Defined in:
cask/uninstall.rb

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.

Class Method Summary collapse

Class Method Details

.uninstall_casks(*casks, binaries: nil, force: false, verbose: false) ⇒ Object

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.



6
7
8
9
10
11
12
13
14
15
16
# File 'cask/uninstall.rb', line 6

def self.uninstall_casks(*casks, binaries: nil, force: false, verbose: false)
  require "cask/installer"

  casks.each do |cask|
    odebug "Uninstalling Cask #{cask}"

    raise CaskNotInstalledError, cask if !cask.installed? && !force

    Installer.new(cask, binaries:, force:, verbose:).uninstall
  end
end