Fix doc subcommand if no path given

pull/619/head
A. R. Shajii 2024-11-13 11:30:00 -05:00
parent 37ff25a907
commit d13d6a58e3
1 changed files with 2 additions and 1 deletions
codon/app

View File

@ -121,7 +121,8 @@ int docMode(const std::vector<const char *> &args, const std::string &argv0) {
}
};
collectPaths(args[1]);
if (args.size() > 1)
collectPaths(args[1]);
auto compiler = std::make_unique<codon::Compiler>(args[0]);
bool failed = false;
auto result = compiler->docgen(files);