diff options
-rw-r--r-- | src/deliverable.c | 6 | ||||
-rw-r--r-- | src/main.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/deliverable.c b/src/deliverable.c index bd2634d..cb3487a 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -324,6 +324,12 @@ int delivery_init_platform(struct Delivery *ctx) { setenv("OMC_CONDA_PLATFORM", ctx->system.platform[DELIVERY_PLATFORM_CONDA_INSTALLER], 1); setenv("OMC_CONDA_PLATFORM_SUBDIR", ctx->system.platform[DELIVERY_PLATFORM_CONDA_SUBDIR], 1); + // Register template variables + // These were moved out of main() because we can't take the address of system.platform[x] + // _before_ the array has been initialized. + tpl_register("system.arch", &ctx->system.arch); + tpl_register("system.platform", &ctx->system.platform[DELIVERY_PLATFORM_RELEASE]); + return 0; } @@ -252,8 +252,6 @@ int main(int argc, char *argv[]) { tpl_register("conda.installer_version", &ctx.conda.installer_version); tpl_register("conda.installer_arch", &ctx.conda.installer_arch); tpl_register("conda.installer_platform", &ctx.conda.installer_platform); - tpl_register("system.arch", &ctx.system.arch); - tpl_register("system.platform", &ctx.system.platform[DELIVERY_PLATFORM_RELEASE]); tpl_register("deploy.jfrog.repo", &globals.jfrog.repo); tpl_register("deploy.docker.registry", &ctx.deploy.docker.registry); tpl_register("workaround.tox_posargs", &globals.workaround.tox_posargs); |