Fix issue blocking success case
This commit is contained in:
parent
ae36f009ef
commit
d6b93147ae
1 changed files with 4 additions and 2 deletions
|
@ -103,17 +103,19 @@ void process_escapes(std::string& input) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gpt_params_parse(int argc, char** argv, gpt_params& params) {
|
bool gpt_params_parse(int argc, char** argv, gpt_params& params) {
|
||||||
|
bool result = true;
|
||||||
try {
|
try {
|
||||||
if (!gpt_params_parse_ex(argc, argv, params)) {
|
if (!gpt_params_parse_ex(argc, argv, params)) {
|
||||||
gpt_print_usage(argc, argv, gpt_params());
|
gpt_print_usage(argc, argv, gpt_params());
|
||||||
return false;
|
result = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const std::invalid_argument& ex) {
|
catch (const std::invalid_argument& ex) {
|
||||||
fprintf(stderr, ex.what());
|
fprintf(stderr, ex.what());
|
||||||
gpt_print_usage(argc, argv, gpt_params());
|
gpt_print_usage(argc, argv, gpt_params());
|
||||||
return false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
|
bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue