Skip to content

Allow command options to be added externally #164

Description

@timriley

In hanami-cli we have generator commands like generate action.

Then in hanami-rspec and hanami-minitest, we add hooks to those commands, like this:

Hanami::CLI.after "generate action", Commands::Generate::Action

Those hooks want a specific extra option for them to do their job, in this case --skip-tests.

Right now the only way to support this extra option is to declare it on the base command in hanami-cli, even though nothing inside that project needs that option.

It would be nice if we could find a way for extra options to be added externally, so projects like hanami-rspec can add them specifically for their own extensions, and the base command can remain unchanged.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions