diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-10-31 15:54:21 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-10-31 15:54:21 -0400 |
commit | 7e181ee9404879381279cb5ccf9ec4d3efb913cf (patch) | |
tree | 523cf91aa5a277a4715ecc0b11d825260c247cdb | |
parent | 8257451d978685c9a83fe4b8e45465c939c6b837 (diff) | |
download | stasis-7e181ee9404879381279cb5ccf9ec4d3efb913cf.tar.gz |
Remote PATH= definition in commandorder-matters
* check_pathvar was the culprit
-rw-r--r-- | src/lib/core/conda.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/core/conda.c b/src/lib/core/conda.c index c2cea0e..5954f20 100644 --- a/src/lib/core/conda.c +++ b/src/lib/core/conda.c @@ -218,13 +218,11 @@ int conda_activate(const char *root, const char *env_name) { const char *init_script_mamba = "/etc/profile.d/mamba.sh"; char path_conda[PATH_MAX] = {0}; char path_mamba[PATH_MAX] = {0}; - char path_bin[PATH_MAX] = {0}; char logfile[PATH_MAX] = {0}; struct Process proc; memset(&proc, 0, sizeof(proc)); // Where to find conda's init scripts - sprintf(path_bin, "%s/bin", root); sprintf(path_conda, "%s%s", root, init_script_conda); sprintf(path_mamba, "%s%s", root, init_script_mamba); @@ -258,7 +256,7 @@ int conda_activate(const char *root, const char *env_name) { // Fully activate conda and record its effect on the runtime environment char command[PATH_MAX * 3]; - snprintf(command, sizeof(command) - 1, "set -a; source %s; source %s; PATH=\"%s:$PATH\" conda activate %s &>/dev/null; env -0", path_conda, path_mamba, path_bin, env_name); + snprintf(command, sizeof(command) - 1, "set -a; source %s; source %s; conda activate %s &>/dev/null; env -0", path_conda, path_mamba, env_name); int retval = shell(&proc, command); if (retval) { // it didn't work; drop out for cleanup |