aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-04-13 20:08:10 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-04-13 20:08:57 +0200
commit9f97056c14990c4e8645c8aaa5a7432e9fdf5102 (patch)
tree7711e23f021c7948bfa7fe085cf8aec6a62d968d /src/main.cpp
parent59705035f912fde35c90786ebf6ecfdd33c520dc (diff)
add 'odin root' command
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 36a99ec32..063b6c8b3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -212,6 +212,7 @@ gb_internal void usage(String argv0) {
print_usage_line(1, "doc Generates documentation on a directory of .odin files.");
print_usage_line(1, "version Prints version.");
print_usage_line(1, "report Prints information useful to reporting a bug.");
+ print_usage_line(1, "root Prints the root path where Odin looks for the builtin collections.");
print_usage_line(0, "");
print_usage_line(0, "For further details on a command, invoke command help:");
print_usage_line(1, "e.g. `odin build -help` or `odin help build`");
@@ -2572,6 +2573,9 @@ int main(int arg_count, char const **arg_ptr) {
print_show_help(args[0], args[2]);
return 0;
}
+ } else if (command == "root") {
+ gb_printf("%.*s", LIT(odin_root_dir()));
+ return 0;
} else {
usage(args[0]);
return 1;