diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb index 66d1ec8dac..2700f78495 100644 --- a/Library/Homebrew/cmd/help.rb +++ b/Library/Homebrew/cmd/help.rb @@ -7,6 +7,8 @@ require "help" module Homebrew module Cmd class HelpCmd < AbstractCommand + cmd_args { description "Print help information." } + sig { override.void } def run Help.help diff --git a/Library/Homebrew/commands.rb b/Library/Homebrew/commands.rb index d44418a0ce..79fcb37dc7 100644 --- a/Library/Homebrew/commands.rb +++ b/Library/Homebrew/commands.rb @@ -177,7 +177,10 @@ module Commands external_commands_file.atomic_write("#{external_commands.sort.join("\n")}\n") end + sig { params(command: String).returns(T.nilable(T::Array[[String, String]])) } def self.command_options(command) + return if command == "help" + path = self.path(command) return if path.blank?