aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-07-13 12:22:04 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-07-13 12:22:04 -0400
commit9b0e9e82daf7998cfd9e5b932bf35d76e61eb8ab (patch)
treea21744f2334f4f04b9aea0bcf122a19b3fc89ed7
parent6f2d18e0b8b15a4ab2066baee9b0ed3aedf4edf8 (diff)
downloadstasis-9b0e9e82daf7998cfd9e5b932bf35d76e61eb8ab.tar.gz
The way the logic is set up I've decided to duplicate the installation code for now until I find time to revise it
* The only meaningful difference between a "fresh start" and reusing the conda installation is a rmtree().
-rw-r--r--src/delivery.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/delivery.c b/src/delivery.c
index 11c5581..37845a8 100644
--- a/src/delivery.c
+++ b/src/delivery.c
@@ -1432,6 +1432,18 @@ void delivery_install_conda(char *install_script, char *conda_install_dir) {
fprintf(stderr, "conda installation failed\n");
exit(1);
}
+ } else {
+ // Proceed with the installation
+ // -b = batch mode (non-interactive)
+ char cmd[PATH_MAX] = {0};
+ snprintf(cmd, sizeof(cmd) - 1, "%s %s -b -p %s",
+ find_program("bash"),
+ install_script,
+ conda_install_dir);
+ if (shell_safe(&proc, cmd)) {
+ fprintf(stderr, "conda installation failed\n");
+ exit(1);
+ }
}
} else {
msg(STASIS_MSG_L3, "Conda removal disabled by configuration\n");