34 lines
953 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2018-09-06 08:29:14 +02:00
module Cask
2018-09-04 08:45:48 +01:00
class Cmd
2017-05-20 19:08:03 +02:00
class Install < AbstractCommand
2017-05-21 00:15:56 +02:00
option "--force", :force, false
option "--skip-cask-deps", :skip_cask_deps, false
def initialize(*)
super
raise CaskUnspecifiedError if args.empty?
2017-05-20 02:27:13 +02:00
end
def run
odie "Installing casks is supported only on macOS" unless OS.mac?
casks.each do |cask|
Installer.new(cask, binaries: binaries?,
verbose: verbose?,
force: force?,
skip_cask_deps: skip_cask_deps?,
require_sha: require_sha?,
quarantine: quarantine?).install
rescue CaskAlreadyInstalledError => e
opoo e.message
2016-09-24 13:52:43 +02:00
end
end
2016-08-18 22:11:42 +03:00
2016-09-24 13:52:43 +02:00
def self.help
"installs the given Cask"
end
end
2016-08-18 22:11:42 +03:00
end
end