diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-10-31 15:58:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 15:58:05 -0400 |
commit | 6db1b15b5c62d6fb52825c1d833ac8dfa9a49fbb (patch) | |
tree | 523cf91aa5a277a4715ecc0b11d825260c247cdb /src/lib | |
parent | f25f05d8ac309b343f8e34e882d92cb8bc78eca3 (diff) | |
parent | 7e181ee9404879381279cb5ccf9ec4d3efb913cf (diff) | |
download | stasis-6db1b15b5c62d6fb52825c1d833ac8dfa9a49fbb.tar.gz |
Merge pull request #66 from jhunkeler/order-matters
BUG: Order matters
Diffstat (limited to 'src/lib')
-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 |