diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-10-30 12:21:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 12:21:20 -0400 |
commit | f25f05d8ac309b343f8e34e882d92cb8bc78eca3 (patch) | |
tree | 740bbf4fa413357d1e839bd308ab545d1271de96 /src | |
parent | ec55ea8fc503ad3fb53635d7e9e6d58a63c6684a (diff) | |
parent | 3da6e513cc64990aa865613bd0bb9ba5d6624570 (diff) | |
download | stasis-f25f05d8ac309b343f8e34e882d92cb8bc78eca3.tar.gz |
Merge pull request #65 from jhunkeler/more-rt
More RT
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/core/conda.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/core/conda.c b/src/lib/core/conda.c index 5954f20..c2cea0e 100644 --- a/src/lib/core/conda.c +++ b/src/lib/core/conda.c @@ -218,11 +218,13 @@ 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); @@ -256,7 +258,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; conda activate %s &>/dev/null; env -0", path_conda, path_mamba, env_name); + 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); int retval = shell(&proc, command); if (retval) { // it didn't work; drop out for cleanup |