From ddc6f95e39c48a639171bc4a41dcf7b4d27aec97 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 15 Apr 2024 00:29:06 -0400 Subject: Fix unhandled installation error(s) * Fix printing deferred package message when not installing deferred packages --- src/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 9e35240..48b5da6 100644 --- a/src/main.c +++ b/src/main.c @@ -521,12 +521,18 @@ int main(int argc, char *argv[]) { msg(OMC_MSG_L2, "Installing pip packages\n"); if (strlist_count(ctx.conda.pip_packages)) { - delivery_install_packages(&ctx, ctx.storage.conda_install_prefix, env_name, INSTALL_PKG_PIP, (struct StrList *[]) {ctx.conda.pip_packages, NULL}); + if (delivery_install_packages(&ctx, ctx.storage.conda_install_prefix, env_name, INSTALL_PKG_PIP, (struct StrList *[]) {ctx.conda.pip_packages, NULL})) { + exit(1); + } } - msg(OMC_MSG_L3, "Installing deferred pip packages\n"); if (strlist_count(ctx.conda.pip_packages_defer)) { - delivery_install_packages(&ctx, ctx.storage.conda_install_prefix, env_name, INSTALL_PKG_PIP | INSTALL_PKG_PIP_DEFERRED, (struct StrList *[]) {ctx.conda.pip_packages_defer, NULL}); + msg(OMC_MSG_L3, "Installing deferred pip packages\n"); + if (delivery_install_packages(&ctx, ctx.storage.conda_install_prefix, env_name, INSTALL_PKG_PIP | INSTALL_PKG_PIP_DEFERRED, (struct StrList *[]) {ctx.conda.pip_packages_defer, NULL})) { + exit(1); + } + } else { + msg(OMC_MSG_L3, "No deferred pip packages\n"); } conda_exec("list"); -- cgit