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