Skip to content

Commit 37b12f9

Browse files
authored
export-lora : handle help argument (#8497)
The --help option on export-lora isn't accepted as valid. The help still gets displayed by default, but the script exits with an error message and nonzero status.
1 parent 0efec57 commit 37b12f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/export-lora/export-lora.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ static bool export_lora_params_parse(int argc, char ** argv, struct export_lora_
190190
if (params->n_threads <= 0) {
191191
params->n_threads = std::thread::hardware_concurrency();
192192
}
193+
} else if (arg == "-h" || arg == "--help") {
194+
export_lora_print_usage(argc, argv, &default_params);
195+
exit(0);
193196
} else {
194197
fprintf(stderr, "error: unknown argument: '%s'\n", arg.c_str());
195198
export_lora_print_usage(argc, argv, &default_params);

0 commit comments

Comments
 (0)