Skip to content

Commit

Permalink
main : fix std in input (ggerganov#503)
Browse files Browse the repository at this point in the history
if we don't add this as an explicit check, then we get an "error: unknown argument: -" later on
  • Loading branch information
conradg authored Feb 15, 2023
1 parent f48204d commit d8d61f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ void whisper_print_usage(int argc, char ** argv, const whisper_params & params);
bool whisper_params_parse(int argc, char ** argv, whisper_params & params) {
for (int i = 1; i < argc; i++) {
std::string arg = argv[i];


if (arg == "-"){
params.fname_inp.push_back(arg);
continue;
}

if (arg[0] != '-') {
params.fname_inp.push_back(arg);
continue;
Expand Down

0 comments on commit d8d61f3

Please sign in to comment.