homebrew-cask-versions/lib/cask/cli/install.rb
Paul Hinze 9835591935 whoops! pass down force argument to installer
this was preventing the `brew cask install --force cask` syntax from
working

the test was wrong too - corrected that so now we're covered from future
breakage

refs #329
2013-05-14 18:08:59 -05:00

20 lines
479 B
Ruby

class Cask::CLI::Install
def self.run(*args)
cask_names = args.reject { |a| a == '--force' }
force = args.include? '--force'
cask_names.each do |cask_name|
begin
cask = Cask.load(cask_name)
Cask::Installer.install(cask, force)
Cask::AppLinker.new(cask).link
Cask::PkgInstaller.new(cask).install
rescue CaskError => e
onoe e
end
end
end
def self.help
"installs the cask of the given name"
end
end