From ec60f5f315683123baa6f07f0390c1ef501d7b3d Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 13 Jul 2024 12:18:31 -0400 Subject: Return early if unpacking the micromamba binary fails --- src/conda.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/conda.c b/src/conda.c index 2a7694e..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]; -- cgit