diff options
Diffstat (limited to 'src/cli')
| -rw-r--r-- | src/cli/stasis_indexer/helpers.c | 5 | ||||
| -rw-r--r-- | src/cli/stasis_indexer/stasis_indexer_main.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/cli/stasis_indexer/helpers.c b/src/cli/stasis_indexer/helpers.c index 3ef96e4..bdb538d 100644 --- a/src/cli/stasis_indexer/helpers.c +++ b/src/cli/stasis_indexer/helpers.c @@ -172,6 +172,11 @@ int micromamba_configure(const struct Delivery *ctx, struct MicromambaInfo *m) { setenv("PATH", pathvar, 1); guard_free(pathvar); + if (micromamba_install(m)) { + SYSERROR("Micromamba installation failed"); + return -1; + } + status += micromamba(m, "config prepend --env channels conda-forge"); if (!globals.verbose) { status += micromamba(m, "config set --env quiet true"); diff --git a/src/cli/stasis_indexer/stasis_indexer_main.c b/src/cli/stasis_indexer/stasis_indexer_main.c index 45bbb6c..c13d175 100644 --- a/src/cli/stasis_indexer/stasis_indexer_main.c +++ b/src/cli/stasis_indexer/stasis_indexer_main.c @@ -309,6 +309,23 @@ int main(const int argc, char *argv[]) { printf(BANNER, version, AUTHOR); guard_free(version); + char *cfg_path = NULL; + if (asprintf(&cfg_path, "%s/stasis.ini", globals.sysconfdir) < 0) { + SYSERROR("Unable to allocate memory for cfg path"); + exit(1); + } + ctx._stasis_ini_fp.cfg_path = cfg_path; + ctx._stasis_ini_fp.cfg = ini_open(ctx._stasis_ini_fp.cfg_path); + if (ctx._stasis_ini_fp.cfg) { + if (populate_delivery_cfg(&ctx, INI_READ_RENDER)) { + SYSERROR("Unable to apply stasis configuration"); + exit(1); + } + } + else { + SYSWARN("Unable to open stasis configuration file: %s", cfg_path); + } + indexer_init_dirs(&ctx, workdir); msg(STASIS_MSG_L1, "%s delivery root %s\n", |
