Skip to content

Commit

Permalink
Change default command option to DryRun
Browse files Browse the repository at this point in the history
Changed the default value for the `-c,--command` option from `Patch` to `DryRun`, ensuring the program performs a dry run by default. Updated the option's description to reflect this new default behavior and clarify that modifications to the CZI-file require explicitly selecting the `Patch` command.
  • Loading branch information
ptahmose committed Jul 5, 2024
1 parent fd56f5b commit 817e45f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Src/czirepair/commandlineoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ CommandLineOptions::ParseResult CommandLineOptions::CommandLineOptions::Parse(in
// specify the string-to-enum-mapping for "command"
std::map<string, Command> map_string_to_command
{
{ "DryRun", Command::DryRun },
{ "Patch", Command::Patch },
{ "DryRun", Command::DryRun },
{ "Patch", Command::Patch },
};

const static VerbosityValidator verbosity_validator;
Expand All @@ -50,8 +50,8 @@ CommandLineOptions::ParseResult CommandLineOptions::CommandLineOptions::Parse(in
string argument_verbosity;

cli_app.add_option("-c,--command", argument_command,
R"(COMMAND can be one of 'DryRun' or 'Patch')")
->default_val(Command::Patch)
R"(Can be one of 'DryRun' or 'Patch' - only with 'Patch' the CZI-file is modified. Default is 'DryRun'.)")
->default_val(Command::DryRun)
->option_text("COMMAND")
->transform(CLI::CheckedTransformer(map_string_to_command, CLI::ignore_case));

Expand Down

0 comments on commit 817e45f

Please sign in to comment.