File tree Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -82,14 +82,13 @@ init_conda_env() {
82
82
local bundle_identifier=" $2 "
83
83
local conda_env_name=" conda_env_${bundle_identifier} "
84
84
85
- if [[ -z " $CONDA_SHLVL " || " $CONDA_SHLVL " -eq 0 ]]; then
86
- if [ -n " $CONDA_EXE " ]; then
87
- source " $( dirname " $CONDA_EXE " ) /../etc/profile.d/conda.sh"
88
- elif [ -n " $MINICONDA_PATH_0 " ] && [ -f " $MINICONDA_PATH_0 /etc/profile.d/conda.sh" ]; then
89
- source " $MINICONDA_PATH_0 /etc/profile.d/conda.sh"
90
- else
91
- echo " Warning: Could not reliably source conda.sh for Conda activation."
92
- fi
85
+ # Always source conda.sh to ensure conda activate is available
86
+ if [ -n " $CONDA_EXE " ] && [ -f " $( dirname " $CONDA_EXE " ) /../etc/profile.d/conda.sh" ]; then
87
+ source " $( dirname " $CONDA_EXE " ) /../etc/profile.d/conda.sh"
88
+ elif [ -n " $MINICONDA_PATH_0 " ] && [ -f " $MINICONDA_PATH_0 /etc/profile.d/conda.sh" ]; then
89
+ source " $MINICONDA_PATH_0 /etc/profile.d/conda.sh"
90
+ else
91
+ echo " Warning: Could not reliably source conda.sh for Conda activation."
93
92
fi
94
93
95
94
if conda env list | grep -q " ^${conda_env_name} [[:space:]]" ; then
Original file line number Diff line number Diff line change @@ -69,14 +69,13 @@ init_conda_env() {
69
69
local bundle_identifier=" $2 "
70
70
local conda_env_name=" conda_env_${bundle_identifier} "
71
71
72
- if [[ -z " $CONDA_SHLVL " || " $CONDA_SHLVL " -eq 0 ]]; then
73
- if [ -n " $CONDA_EXE " ]; then
74
- source " $( dirname " $CONDA_EXE " ) /../etc/profile.d/conda.sh"
75
- elif [ -n " $MINICONDA_PATH_0 " ] && [ -f " $MINICONDA_PATH_0 /etc/profile.d/conda.sh" ]; then
76
- source " $MINICONDA_PATH_0 /etc/profile.d/conda.sh"
77
- else
78
- echo " Warning: Could not reliably source conda.sh for Conda activation."
79
- fi
72
+ # Always source conda.sh to ensure conda activate is available
73
+ if [ -n " $CONDA_EXE " ] && [ -f " $( dirname " $CONDA_EXE " ) /../etc/profile.d/conda.sh" ]; then
74
+ source " $( dirname " $CONDA_EXE " ) /../etc/profile.d/conda.sh"
75
+ elif [ -n " $MINICONDA_PATH_0 " ] && [ -f " $MINICONDA_PATH_0 /etc/profile.d/conda.sh" ]; then
76
+ source " $MINICONDA_PATH_0 /etc/profile.d/conda.sh"
77
+ else
78
+ echo " Warning: Could not reliably source conda.sh for Conda activation."
80
79
fi
81
80
82
81
if conda env list | grep -q " ^${conda_env_name} [[:space:]]" ; then
You can’t perform that action at this time.
0 commit comments