diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-09-05 21:59:56 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-09-05 21:59:56 +0200 |
| commit | a5a93473085dea8659be825a91bbfd01b7166474 (patch) | |
| tree | d638a5fc06b87ac02260aa28dd9ecdd61256760d /src/main.cpp | |
| parent | c7deff4d2e73730fea9e651e363b0c72031c6ce6 (diff) | |
Improve error message when you use -file as the verb.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index ef1b8dda1..31371b565 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2727,7 +2727,12 @@ int main(int arg_count, char const **arg_ptr) { if (!single_file_package) { gb_printf_err("ERROR: `%.*s %.*s` takes a package as its first argument.\n", LIT(args[0]), LIT(command)); - gb_printf_err("Did you mean `%.*s %.*s %.*s -file`?\n", LIT(args[0]), LIT(command), LIT(init_filename)); + if (init_filename == "-file") { + gb_printf_err("Did you mean `%.*s %.*s <filename.odin> -file`?\n", LIT(args[0]), LIT(command)); + } else { + gb_printf_err("Did you mean `%.*s %.*s %.*s -file`?\n", LIT(args[0]), LIT(command), LIT(init_filename)); + } + gb_printf_err("The `-file` flag tells it to treat a file as a self-contained package.\n"); return 1; } else { |