Skip to content

Commit eef503a

Browse files
cailmdaleyclaude
andcommitted
fix: locate conda.sh via conda info --base in install_shapepipe
The installer only looked for conda.sh under /opt/conda (the docker-image convention) or $CONDA_PREFIX. On GitHub Actions runners conda lives elsewhere and $CONDA_PREFIX is empty in the install step's shell, so both checks miss and install aborts with "Could not find conda.sh". This broke the full test suite at the install step — invisible until now because CI never ran on develop. Query conda for its base prefix instead, which is authoritative wherever conda was installed (runners, miniforge, custom prefixes like intelpython). Keep /opt/conda and $CONDA_PREFIX as fallbacks for environments where conda can't be queried. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4746cee commit eef503a

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

install_shapepipe

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,21 @@ check_conda() {
119119
echo -ne "${RED}ERROR: Found Conda version $CONDA_VERSION but require 4.0.0 or greater.${NC}\n"
120120
exit 1
121121
fi
122-
# Look for conda.sh file
123-
if [ -f "/opt/conda/$CONDA_SH" ]
122+
# Look for conda.sh file. `conda info --base` is authoritative wherever conda
123+
# lives (GitHub runners, miniforge, custom installs); fall back to the
124+
# conventional locations for environments where it can't be queried.
125+
CONDA_BASE=$(conda info --base 2>/dev/null)
126+
if [ -n "$CONDA_BASE" ] && [ -f "$CONDA_BASE$CONDA_SH" ]
124127
then
125-
source "/opt/conda/$CONDA_SH"
128+
source "$CONDA_BASE$CONDA_SH"
129+
elif [ -f "/opt/conda$CONDA_SH" ]
130+
then
131+
source "/opt/conda$CONDA_SH"
126132
elif [ -f "$CONDA_PREFIX$CONDA_SH" ]
127133
then
128134
source "$CONDA_PREFIX$CONDA_SH"
129135
else
130-
echo -ne "${RED}ERROR: Could not find $CONDA_SH in /opt/conda or \$CONDA_PREFIX.${NC}\n"
136+
echo -ne "${RED}ERROR: Could not find $CONDA_SH in \$(conda info --base), /opt/conda, or \$CONDA_PREFIX.${NC}\n"
131137
echo -ne "${RED}Activate the base/root Conda environment and try again.${NC}\n"
132138
exit 1
133139
fi

0 commit comments

Comments
 (0)