From d13d6a58e3aba1f59109e3327af7c1f076d843f5 Mon Sep 17 00:00:00 2001 From: "A. R. Shajii" Date: Wed, 13 Nov 2024 11:30:00 -0500 Subject: [PATCH] Fix doc subcommand if no path given --- codon/app/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codon/app/main.cpp b/codon/app/main.cpp index 7d602dae..3451eeed 100644 --- a/codon/app/main.cpp +++ b/codon/app/main.cpp @@ -121,7 +121,8 @@ int docMode(const std::vector &args, const std::string &argv0) { } }; - collectPaths(args[1]); + if (args.size() > 1) + collectPaths(args[1]); auto compiler = std::make_unique(args[0]); bool failed = false; auto result = compiler->docgen(files);