From 804b303ec6891be2536ef1433b16534a6621e6d4 Mon Sep 17 00:00:00 2001 From: Steve Bonds Date: Mon, 15 Jul 2024 17:20:40 -0700 Subject: [PATCH] handle export-lora help argument 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. --- examples/export-lora/export-lora.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/export-lora/export-lora.cpp b/examples/export-lora/export-lora.cpp index 08413f57e..16f27aa77 100644 --- a/examples/export-lora/export-lora.cpp +++ b/examples/export-lora/export-lora.cpp @@ -190,6 +190,9 @@ static bool export_lora_params_parse(int argc, char ** argv, struct export_lora_ if (params->n_threads <= 0) { params->n_threads = std::thread::hardware_concurrency(); } + } else if (arg == "-h" || arg == "--help") { + export_lora_print_usage(argc, argv, &default_params); + exit(0); } else { fprintf(stderr, "error: unknown argument: '%s'\n", arg.c_str()); export_lora_print_usage(argc, argv, &default_params);