Skip to content

Commit 8e4d678

Browse files
authored
common : skip model validation when --completion-bash is requested (#17975)
1 parent 07a10c1 commit 8e4d678

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/arg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ static bool common_params_parse_ex(int argc, char ** argv, common_params_context
504504

505505
// model is required (except for server)
506506
// TODO @ngxson : maybe show a list of available models in CLI in this case
507-
if (params.model.path.empty() && ctx_arg.ex != LLAMA_EXAMPLE_SERVER && !params.usage) {
507+
if (params.model.path.empty() && ctx_arg.ex != LLAMA_EXAMPLE_SERVER && !params.usage && !params.completion) {
508508
throw std::invalid_argument("error: --model is required\n");
509509
}
510510

0 commit comments

Comments
 (0)