Skip to content

Commit

Permalink
feat: ignore empty command line arguments
Browse files Browse the repository at this point in the history
Those can be passed by tools calling HotSpot and lead to "File '' does not exist." error messages.
  • Loading branch information
GitMensch committed Sep 17, 2024
1 parent 36bedef commit f4b7b4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ int main(int argc, char** argv)
applyCliArgs(settings);

auto files = parser.positionalArguments();

// remove empty arguments that may be added by tools calling HotSpot
files.removeAll(QString());

if (files.size() != 1 && parser.isSet(exportTo)) {
QTextStream err(stderr);
err << QCoreApplication::translate("main", "Error: expected a single input file to convert, instead of %1.",
Expand Down

0 comments on commit f4b7b4d

Please sign in to comment.