mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-14 21:08:07 +00:00
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
This commit is contained in:
@ -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) {
|
bool whisper_params_parse(int argc, char ** argv, whisper_params & params) {
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
std::string arg = argv[i];
|
std::string arg = argv[i];
|
||||||
|
|
||||||
|
if (arg == "-"){
|
||||||
|
params.fname_inp.push_back(arg);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (arg[0] != '-') {
|
if (arg[0] != '-') {
|
||||||
params.fname_inp.push_back(arg);
|
params.fname_inp.push_back(arg);
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user