Skip to content

Commit

Permalink
remocve Cask::Upgrade::OPTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
hyuraku committed Mar 9, 2023
1 parent 2f870fa commit 869c8ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
15 changes: 0 additions & 15 deletions Library/Homebrew/cask/upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ module Cask
class Upgrade
extend T::Sig

OPTIONS = [
[:switch, "--skip-cask-deps", {
description: "Skip installing cask dependencies.",
}],
[:switch, "-g", "--greedy", {
description: "Also include casks with `auto_updates true` or `version :latest`.",
}],
[:switch, "--greedy-latest", {
description: "Also include casks with `version :latest`.",
}],
[:switch, "--greedy-auto-updates", {
description: "Also include casks with `auto_updates true`.",
}],
].freeze

sig {
params(
casks: Cask,
Expand Down
13 changes: 12 additions & 1 deletion Library/Homebrew/cmd/upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,19 @@ def upgrade_args
description: "Treat all named arguments as casks. If no named arguments " \
"are specified, upgrade only outdated casks.",
}],
[:switch, "--skip-cask-deps", {
description: "Skip installing cask dependencies.",
}],
[:switch, "-g", "--greedy", {
description: "Also include casks with `auto_updates true` or `version :latest`.",
}],
[:switch, "--greedy-latest", {
description: "Also include casks with `version :latest`.",
}],
[:switch, "--greedy-auto-updates", {
description: "Also include casks with `auto_updates true`.",
}],
*Cask::Cmd::AbstractCommand::OPTIONS.map(&:dup),
*Cask::Upgrade::OPTIONS.map(&:dup),
].each do |args|
options = args.pop
send(*args, **options)
Expand Down

0 comments on commit 869c8ef

Please sign in to comment.