diff --git a/Library/Homebrew/abstract_command.rb b/Library/Homebrew/abstract_command.rb index 46c4e2b0e2..7bdc7b3907 100644 --- a/Library/Homebrew/abstract_command.rb +++ b/Library/Homebrew/abstract_command.rb @@ -32,12 +32,6 @@ module Homebrew .delete_suffix("-cmd") end - sig { void } - def raise_sh_command_error! - raise StandardError, "This command is just here for completions generation. " \ - "It's actually defined in `cmd/#{command_name}` instead." - end - # @return the AbstractCommand subclass associated with the brew CLI command name. sig { params(name: String).returns(T.nilable(T.class_of(AbstractCommand))) } def command(name) = subclasses.find { _1.command_name == name } @@ -67,5 +61,12 @@ module Homebrew sig { abstract.void } def run; end + + sig { void } + def raise_sh_command_error! + raise StandardError, + "This command is just here for completions generation. " \ + "It's actually defined in `cmd/#{self.class.command_name}.sh` instead." + end end end