abstract_command: fix raise_sh_command_error! not being found
This commit is contained in:
parent
5987c5c1d0
commit
913ea0e5e4
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user