Skip to content
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

SetDefault does not work as expected #1588

Open
LLSavion opened this issue Jul 23, 2024 · 4 comments
Open

SetDefault does not work as expected #1588

LLSavion opened this issue Jul 23, 2024 · 4 comments
Labels
area-CLI Command-Line Interface bug Something isn't working needs triage

Comments

@LLSavion
Copy link

config.AddBranch("doSomething", add =>
{
    add.SetDefaultCommand<ACommand>();
    add.AddCommand<ACommand>("normal").WithData(contextData).WithDescription("Merge 'Models'.");
    add.AddCommand<BCommand>("different").WithData(contextData).WithDescription("Merge models using a session file.");
});

So in my opinion if I write "doSomething normal --parameters" it should be equal to "doSomething --parameters"! However when I enter them they both execute the Execute-Function in the ACommand but when I leave out the normal and just write "doSomething --parameters" the parameters in the settings are null instead of the values I passed.

@LLSavion LLSavion added bug Something isn't working needs triage labels Jul 23, 2024
@LLSavion
Copy link
Author

These settings:
grafik

@LLSavion
Copy link
Author

Conclusion:
"doSomething normal --parameters" parameters in the settings are there
"doSomething --parameters" parameters in the settings are null
Both are ACommand
And ACommand is set to default.

@FrankRay78 FrankRay78 added the area-CLI Command-Line Interface label Aug 8, 2024
@LLSavion
Copy link
Author

When can I expect it?

@patriksvensson
Copy link
Contributor

Probably when someone submits a PR for it and it passes review etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CLI Command-Line Interface bug Something isn't working needs triage
Projects
Status: Todo 🕑
Development

No branches or pull requests

3 participants