diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-21 15:54:55 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-21 15:54:55 -0500 |
| commit | 434ffd71c9a7eebd46ec0cba1d97b0827b874901 (patch) | |
| tree | eb5b02823b7cba714136a0c6b777aca36d147c3a /src/modules.c | |
| parent | 63e6d52f1e1ad9ba3e5dd453115abfc2f8418fc6 (diff) | |
Don't embed tomo version/path information at compile time, instead infer
it at runtime
Diffstat (limited to 'src/modules.c')
| -rw-r--r-- | src/modules.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules.c b/src/modules.c index 36952ec8..056cd5cc 100644 --- a/src/modules.c +++ b/src/modules.c @@ -102,7 +102,7 @@ module_info_t get_used_module_info(ast_t *use) { const char *name = Match(use, Use)->path; module_info_t *info = new (module_info_t, .name = name); Path_t tomo_default_modules = - Path$from_text(Texts(Text$from_str(TOMO_PATH), "/lib/tomo@" TOMO_VERSION "/modules.ini")); + Path$from_text(Texts(Text$from_str(TOMO_PATH), "/lib/tomo@", TOMO_VERSION, "/modules.ini")); read_modules_ini(tomo_default_modules, info); read_modules_ini(Path$sibling(Path$from_str(use->file->filename), Text("modules.ini")), info); read_modules_ini(Path$with_extension(Path$from_str(use->file->filename), Text(":modules.ini"), false), info); @@ -111,8 +111,8 @@ module_info_t get_used_module_info(ast_t *use) { } bool try_install_module(module_info_t mod, bool ask_confirmation) { - Path_t dest = Path$from_text(Texts(Text$from_str(TOMO_PATH), "/lib/tomo@" TOMO_VERSION "/", Text$from_str(mod.name), - "@", Text$from_str(mod.version))); + Path_t dest = Path$from_text(Texts(Text$from_str(TOMO_PATH), "/lib/tomo@", TOMO_VERSION, "/", + Text$from_str(mod.name), "@", Text$from_str(mod.version))); if (Path$exists(dest)) return true; print("No such path: ", dest); |
