Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
CC: gcc-9
CXX: g++-9
if: runner.os == 'Linux'
run: ./install_shapepipe --develop
run: ./install_shapepipe --env-dev

- name: Install package (macOS)
shell: bash -l {0}
if: runner.os == 'macOS'
run: ./install_shapepipe --develop
run: ./install_shapepipe --env-dev

- name: Run tests
shell: bash -l {0}
Expand Down
14 changes: 10 additions & 4 deletions install_shapepipe
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,21 @@ check_conda() {
echo -ne "${RED}ERROR: Found Conda version $CONDA_VERSION but require 4.0.0 or greater.${NC}\n"
exit 1
fi
# Look for conda.sh file
if [ -f "/opt/conda/$CONDA_SH" ]
# Look for conda.sh file. `conda info --base` is authoritative wherever conda
# lives (GitHub runners, miniforge, custom installs); fall back to the
# conventional locations for environments where it can't be queried.
CONDA_BASE=$(conda info --base 2>/dev/null)
if [ -n "$CONDA_BASE" ] && [ -f "$CONDA_BASE$CONDA_SH" ]
then
source "/opt/conda/$CONDA_SH"
source "$CONDA_BASE$CONDA_SH"
elif [ -f "/opt/conda$CONDA_SH" ]
then
source "/opt/conda$CONDA_SH"
elif [ -f "$CONDA_PREFIX$CONDA_SH" ]
then
source "$CONDA_PREFIX$CONDA_SH"
else
echo -ne "${RED}ERROR: Could not find $CONDA_SH in /opt/conda or \$CONDA_PREFIX.${NC}\n"
echo -ne "${RED}ERROR: Could not find $CONDA_SH in \$(conda info --base), /opt/conda, or \$CONDA_PREFIX.${NC}\n"
echo -ne "${RED}Activate the base/root Conda environment and try again.${NC}\n"
exit 1
fi
Expand Down
Loading