Skip to content

Commit f4b7b4d

Browse files
committed
feat: ignore empty command line arguments
Those can be passed by tools calling HotSpot and lead to "File '' does not exist." error messages.
1 parent 36bedef commit f4b7b4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ int main(int argc, char** argv)
202202
applyCliArgs(settings);
203203

204204
auto files = parser.positionalArguments();
205+
206+
// remove empty arguments that may be added by tools calling HotSpot
207+
files.removeAll(QString());
208+
205209
if (files.size() != 1 && parser.isSet(exportTo)) {
206210
QTextStream err(stderr);
207211
err << QCoreApplication::translate("main", "Error: expected a single input file to convert, instead of %1.",

0 commit comments

Comments
 (0)