Skip to content

Commit

Permalink
chore: 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 Jun 7, 2024
1 parent d5d9cd4 commit 7fd1ce6
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(QLatin1String(""));

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 7fd1ce6

Please sign in to comment.