Issy Long 341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00

34 lines
953 B
Ruby

# frozen_string_literal: true
module Cask
class Cmd
class Install < AbstractCommand
option "--force", :force, false
option "--skip-cask-deps", :skip_cask_deps, false
def initialize(*)
super
raise CaskUnspecifiedError if args.empty?
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
end
end
def self.help
"installs the given Cask"
end
end
end
end