Skip to content

Commit

Permalink
Merge pull request #169 from RadWolfie/hotfix-cli
Browse files Browse the repository at this point in the history
HOTFIX: somehow interactive check got missed in unit test
  • Loading branch information
RadWolfie authored Nov 30, 2022
2 parents 51488b6 + 4a175bb commit 77df59d
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,20 @@ static int cliInputInteractive(int argc, char** argv)
cli_config::GetValue("interactive", &interactive_request);
bInteractiveRequested = true;
}
// Check if user request no interaction.
if (interactive_request == "no") {
g_interactive_mode = false;
}
// Check if user request interaction. (default)
else if (interactive_request == "yes") {
g_interactive_mode = true;
}
// otherwise input is invalid
else {
return invalid_argument(argc, argv);

if (bInteractiveRequested) {
// Check if user request no interaction.
if (interactive_request == "no") {
g_interactive_mode = false;
}
// Check if user request interaction. (default)
else if (interactive_request == "yes") {
g_interactive_mode = true;
}
// otherwise input is invalid
else {
return invalid_argument(argc, argv);
}
}
return 0;
}
Expand Down

0 comments on commit 77df59d

Please sign in to comment.