mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
- add new file "cask/utils.rb" analogous to "utils.rb" in Homebrew - define odebug and odumpcask, analogs of ohai and friends, but which only give output when --debug is in effect - move the debug setting from an instance variable in Cask::CLI to a method Cask.debug, defined in "lib/cask/options.rb", which was added in #2276. (Perhaps options.rb should be merged back into Cask::CLI). - sprinkle odebug statements liberally throughout the codebase - update tests
16 lines
430 B
Ruby
16 lines
430 B
Ruby
class Cask::CLI::Install
|
|
def self.run(*args)
|
|
raise CaskUnspecifiedError if args.empty?
|
|
cask_names = args.reject { |a| a.chars.first == '-' }
|
|
force = args.include? '--force'
|
|
cask_names.each do |cask_name|
|
|
odebug "Installing Cask #{cask_name}"
|
|
cask = Cask.load(cask_name)
|
|
Cask::Installer.new(cask).install(force)
|
|
end
|
|
end
|
|
|
|
def self.help
|
|
"installs the cask of the given name"
|
|
end
|
|
end
|