Skip to content

Configurable command builder #925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Configurable command builder #925

wants to merge 4 commits into from

Conversation

KathleenDollard
Copy link
Contributor

Fixes #924

As described in issue #924 use of host builders (see #919) is blocked because the Command is added to the CommandLineBuilder prior to configuration.

There are several ways to fix this. I chose this approach because:

  • Changing the behavior of RootCommand would be huge and breaking. Not passing anything to this gives you a pleasant default based on your executable and defaults. It's common to build on this.

  • I wanted to make it as hard as possible to set the command. In almost all cases, it should be set at builder instantiation as happens today.

  • I wanted the configurable builder pattern to be usable beyond the current host to other hosting scenarios (other host interfaces).

I am not happy with the name, but thought it was at least immensely clear.

@KathleenDollard
Copy link
Contributor Author

Let's look for a way to do this that is lighter than creating a new class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create mechanism for late addition of Command in CommandBuilder
2 participants