mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
* was already done, but inconsistently * this style follows homebrew Formula * covers user-facing messages, test titles, comments * some related minor orthography is included, such as the consistent spelling of our project name as "homebrew-cask" * grammar nits
17 lines
519 B
Ruby
17 lines
519 B
Ruby
class Cask::CLI::Uninstall < Cask::CLI::Base
|
|
def self.run(*args)
|
|
cask_names = cask_names_from(args)
|
|
raise CaskUnspecifiedError if cask_names.empty?
|
|
force = args.include? '--force'
|
|
cask_names.each do |cask_name|
|
|
odebug "Uninstalling Cask #{cask_name}"
|
|
cask = Cask.load(cask_name)
|
|
raise CaskNotInstalledError.new(cask) unless cask.installed? or force
|
|
Cask::Installer.new(cask).uninstall(force)
|
|
end
|
|
end
|
|
|
|
def self.help
|
|
"uninstalls the Cask of the given name"
|
|
end
|
|
end
|