Class: Cask::Reinstall Private
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Class Method Summary collapse
Class Method Details
.reinstall_casks(*casks, verbose: false, force: false, skip_cask_deps: false, binaries: false, require_sha: false, quarantine: false, zap: false) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'cask/reinstall.rb', line 12 def self.reinstall_casks( *casks, verbose: false, force: false, skip_cask_deps: false, binaries: false, require_sha: false, quarantine: false, zap: false ) require "cask/installer" quarantine = true if quarantine.nil? download_queue = Homebrew::DownloadQueue.new(pour: true) if Homebrew::EnvConfig.download_concurrency > 1 cask_installers = casks.map do |cask| Installer.new(cask, binaries:, verbose:, force:, skip_cask_deps:, require_sha:, reinstall: true, quarantine:, zap:, download_queue:) end if download_queue cask_installers.each(&:prelude) oh1 "Fetching downloads for: #{casks.map { |cask| Formatter.identifier(cask.full_name) }.to_sentence}", truncate: false cask_installers.each(&:enqueue_downloads) download_queue.fetch end cask_installers.each(&:install) end |