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

Pass command line arguments and options to subcommands #2718

Merged
4 changes: 2 additions & 2 deletions src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ public int Run(string[] args)
Description = @"The target for the compare. For example, when runnin on branch feat-2 and wanting to compare to branch ""main"", set this value to ""main""",
ShowInHelpText = true
};
cmdConfigReader.RegisterCliInput(app, targetInput);
cmdConfigReader.RegisterCliInput(baselineCmd, targetInput);
cmdConfigReader.AddCliInput(targetInput.Input, "--target", "-t", CommandOptionType.SingleValue, InputCategory.Mutation);
baselineCmd.AddOption(targetOption);
baselineCmd.Command("recreate", createCmd =>
{
cmdConfigReader.RegisterCommandLineOptions(createCmd, inputs);
cmdConfigReader.RegisterCliInput(app, targetInput);
cmdConfigReader.RegisterCliInput(createCmd, targetInput);
cmdConfigReader.AddCliInput(targetInput.Input, "--target", "-t", CommandOptionType.SingleValue, InputCategory.Mutation);
createCmd.AddOption(targetOption);

Expand Down