From fdbbe5c1aae2388af048e9e26d8a60fb8c25ec37 Mon Sep 17 00:00:00 2001 From: Chad Adams Date: Sat, 3 Jan 2026 11:17:12 -0500 Subject: [PATCH] improve c3c init error message (#2697) Co-authored-by: Christoffer Lerno --- src/build/build_options.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/build/build_options.c b/src/build/build_options.c index 76e0dc486..b337641df 100644 --- a/src/build/build_options.c +++ b/src/build/build_options.c @@ -371,7 +371,13 @@ static void parse_command(BuildOptions *options) if (arg_match("init")) { options->command = COMMAND_INIT; - if (at_end() || next_is_opt()) error_exit("Expected a project name after init"); + if (at_end() || next_is_opt()) + { + error_exit("Error: Expected a project name after 'init'.\n\n" + "Usage: c3c init \n\n" + "- Specify a project name (e.g., 'c3c init myproject') to create a new directory with that name containing the project structure.\n" + "- Use '.' (e.g., 'c3c init .') to initialize the project in the current working directory."); + } options->project_name = next_arg(); return; }