diff options
Diffstat (limited to 'src/conda.c')
-rw-r--r-- | src/conda.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/conda.c b/src/conda.c index 976bbbc..7aaec77 100644 --- a/src/conda.c +++ b/src/conda.c @@ -35,7 +35,10 @@ int micromamba(struct MicromambaInfo *info, char *command, ...) { char untarcmd[PATH_MAX * 2]; mkdirs(info->micromamba_prefix, 0755); sprintf(untarcmd, "tar -xvf %s -C %s --strip-components=1 bin/micromamba 1>/dev/null", installer_path, info->micromamba_prefix); - system(untarcmd); + int untarcmd_status = system(untarcmd); + if (untarcmd_status) { + return -1; + } } char cmd[STASIS_BUFSIZ]; @@ -249,7 +252,7 @@ int conda_check_required() { return 0; } -void conda_setup_headless() { +int conda_setup_headless() { if (globals.verbose) { conda_exec("config --system --set quiet false"); } else { @@ -285,7 +288,7 @@ void conda_setup_headless() { if (conda_exec(cmd)) { msg(STASIS_MSG_ERROR | STASIS_MSG_L2, "Unable to install user-defined base packages (conda)\n"); - exit(1); + return 1; } } @@ -307,7 +310,7 @@ void conda_setup_headless() { if (pip_exec(cmd)) { msg(STASIS_MSG_ERROR | STASIS_MSG_L2, "Unable to install user-defined base packages (pip)\n"); - exit(1); + return 1; } } @@ -315,15 +318,17 @@ void conda_setup_headless() { msg(STASIS_MSG_ERROR | STASIS_MSG_L2, "Your STASIS configuration lacks the bare" " minimum software required to build conda packages." " Please fix it.\n"); - exit(1); + return 1; } if (globals.always_update_base_environment) { if (conda_exec("update --all")) { fprintf(stderr, "conda update was unsuccessful\n"); - exit(1); + return 1; } } + + return 0; } int conda_env_create_from_uri(char *name, char *uri) { |