diff --git a/CLI/FileUtils.cpp b/CLI/FileUtils.cpp index cb993dfe..5e1e9047 100644 --- a/CLI/FileUtils.cpp +++ b/CLI/FileUtils.cpp @@ -190,7 +190,10 @@ bool traverseDirectory(const std::string& path, const std::function getSourceFiles(int argc, char** argv) for (int i = 1; i < argc; ++i) { - if (argv[i][0] == '-') + // Treat '-' as a special file whose source is read from stdin + // All other arguments that start with '-' are skipped + if (argv[i][0] == '-' && argv[i][1] != '\0') { continue; + } if (isDirectory(argv[i])) {