homebrew-cask-versions/lib/cask/cli/zap.rb
Roland Walker 00921dd513 functionality and docs for zap stanza
* `zap` was previously supported as a noop for forward-compatibility
* Also adds restrictions against relative paths in `uninstall :files`
* Also documents safety conventions for `uninstall :files`
2014-09-13 10:21:17 -04:00

15 lines
416 B
Ruby

class Cask::CLI::Zap < Cask::CLI::Base
def self.run(*args)
raise CaskUnspecifiedError if args.empty?
cask_names = args.reject { |a| a.chars.first == '-' }
cask_names.each do |cask_name|
odebug "Zapping Cask #{cask_name}"
cask = Cask.load(cask_name)
Cask::Installer.new(cask).zap
end
end
def self.help
"zaps all files associated with the cask of the given name"
end
end