homebrew-cask-versions/lib/cask/cli/uninstall.rb
Roland Walker 707db75505 standardize Cask (capitalized) when used as noun
* 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
2014-10-08 10:39:51 -04:00

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