Skip to content

Commit

Permalink
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 authored Jun 7, 2024
1 parent d5d9cd4 commit f4d3a9d
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(QStringLiteral(""));

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 f4d3a9d

Please sign in to comment.