From 413e8ac81eee808958ea86ccead1590387784cc1 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Sat, 11 Mar 2023 22:12:33 +0900 Subject: [PATCH] remove cask/cmd/fetch --- Library/Homebrew/cask/cmd.rb | 1 - Library/Homebrew/cask/cmd/fetch.rb | 41 ------------------------------ 2 files changed, 42 deletions(-) delete mode 100644 Library/Homebrew/cask/cmd/fetch.rb diff --git a/Library/Homebrew/cask/cmd.rb b/Library/Homebrew/cask/cmd.rb index 218a35e4f5..1bd835b7b4 100644 --- a/Library/Homebrew/cask/cmd.rb +++ b/Library/Homebrew/cask/cmd.rb @@ -11,7 +11,6 @@ require "cask/config" require "cask/cmd/abstract_command" require "cask/cmd/audit" -require "cask/cmd/fetch" require "cask/cmd/install" require "cask/cmd/reinstall" require "cask/cmd/uninstall" diff --git a/Library/Homebrew/cask/cmd/fetch.rb b/Library/Homebrew/cask/cmd/fetch.rb deleted file mode 100644 index da0eb66295..0000000000 --- a/Library/Homebrew/cask/cmd/fetch.rb +++ /dev/null @@ -1,41 +0,0 @@ -# typed: false -# frozen_string_literal: true - -module Cask - class Cmd - # Cask implementation of the `brew fetch` command. - # - # @api private - class Fetch < AbstractCommand - extend T::Sig - - def self.parser - super do - switch "--force", - description: "Force redownloading even if files already exist in local cache." - end - end - - sig { void } - def run - require "cask/download" - require "cask/installer" - - options = { - quarantine: args.quarantine?, - }.compact - - options[:quarantine] = true if options[:quarantine].nil? - - casks.each do |cask| - puts Installer.caveats(cask) - ohai "Downloading external files for Cask #{cask}" - download = Download.new(cask, **options) - download.clear_cache if args.force? - downloaded_path = download.fetch - ohai "Success! Downloaded to: #{downloaded_path}" - end - end - end - end -end