From 6914c310c74793511f0d975c1bb0a407429e8a2d Mon Sep 17 00:00:00 2001 From: apainintheneck Date: Thu, 9 Feb 2023 17:14:58 -0800 Subject: [PATCH] extend/os: remove cask install code This code is unnecessary since `--formula` is passed by default to the install command on Linux making it impossible to reach `Cask::Cmd::Install.install_casks` since it is surrounded by `if casks.any?; end`. --- Library/Homebrew/cask/cmd/install.rb | 1 - .../Homebrew/extend/os/cask/cmd/install.rb | 4 --- .../extend/os/linux/cask/cmd/install.rb | 29 ------------------- 3 files changed, 34 deletions(-) delete mode 100644 Library/Homebrew/extend/os/cask/cmd/install.rb delete mode 100644 Library/Homebrew/extend/os/linux/cask/cmd/install.rb diff --git a/Library/Homebrew/cask/cmd/install.rb b/Library/Homebrew/cask/cmd/install.rb index 961662f7a7..71d39f491f 100644 --- a/Library/Homebrew/cask/cmd/install.rb +++ b/Library/Homebrew/cask/cmd/install.rb @@ -2,7 +2,6 @@ # frozen_string_literal: true require "cask_dependent" -require "extend/os/cask/cmd/install" module Cask class Cmd diff --git a/Library/Homebrew/extend/os/cask/cmd/install.rb b/Library/Homebrew/extend/os/cask/cmd/install.rb deleted file mode 100644 index aeb209fac6..0000000000 --- a/Library/Homebrew/extend/os/cask/cmd/install.rb +++ /dev/null @@ -1,4 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "extend/os/linux/cask/cmd/install" if OS.linux? diff --git a/Library/Homebrew/extend/os/linux/cask/cmd/install.rb b/Library/Homebrew/extend/os/linux/cask/cmd/install.rb deleted file mode 100644 index 201666f52a..0000000000 --- a/Library/Homebrew/extend/os/linux/cask/cmd/install.rb +++ /dev/null @@ -1,29 +0,0 @@ -# typed: false -# frozen_string_literal: true - -require "cask_dependent" - -module Cask - class Cmd - # Cask implementation of the `brew install` command. - # - # @api private - class Install < AbstractCommand - def self.install_casks( - _casks, - verbose: nil, - force: nil, - adopt: nil, - binaries: nil, - skip_cask_deps: nil, - require_sha: nil, - quarantine: nil, - quiet: nil, - zap: nil, - dry_run: nil - ) - odie "Installing casks is supported only on macOS" - end - end - end -end