manpages: fix error under Ruby 3
This commit is contained in:
parent
e002907b14
commit
fa5ca71749
@ -145,8 +145,8 @@ module Homebrew
|
||||
|
||||
if long.present?
|
||||
next if Homebrew::CLI::Parser.global_options.include?([short, long, desc])
|
||||
next if Homebrew::CLI::Parser.global_cask_options.any? do |_, option, description:, **|
|
||||
[long, "#{long}="].include?(option) && description == desc
|
||||
next if Homebrew::CLI::Parser.global_cask_options.any? do |_, option, kwargs|
|
||||
[long, "#{long}="].include?(option) && kwargs.fetch(:description) == desc
|
||||
end
|
||||
end
|
||||
|
||||
@ -184,8 +184,8 @@ module Homebrew
|
||||
def self.global_cask_options_manpage
|
||||
lines = ["These options are applicable to the `install`, `reinstall`, and `upgrade` " \
|
||||
"subcommands with the `--cask` switch.\n"]
|
||||
lines += Homebrew::CLI::Parser.global_cask_options.map do |_, long, description:, **|
|
||||
generate_option_doc(nil, long.chomp("="), description)
|
||||
lines += Homebrew::CLI::Parser.global_cask_options.map do |_, long, kwargs|
|
||||
generate_option_doc(nil, long.chomp("="), kwargs.fetch(:description))
|
||||
end
|
||||
lines.join("\n")
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user