Skip to content

Commit 69e6e46

Browse files
authored
main : fix std in input (#503)
if we don't add this as an explicit check, then we get an "error: unknown argument: -" later on
1 parent 09d7d2b commit 69e6e46

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/main/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ void whisper_print_usage(int argc, char ** argv, const whisper_params & params);
9191
bool whisper_params_parse(int argc, char ** argv, whisper_params & params) {
9292
for (int i = 1; i < argc; i++) {
9393
std::string arg = argv[i];
94-
94+
95+
if (arg == "-"){
96+
params.fname_inp.push_back(arg);
97+
continue;
98+
}
99+
95100
if (arg[0] != '-') {
96101
params.fname_inp.push_back(arg);
97102
continue;

0 commit comments

Comments
 (0)