diff --git a/.ci/micromamba/init.sh b/.ci/micromamba/init.sh index 8c2bdf02..ad2515b2 100644 --- a/.ci/micromamba/init.sh +++ b/.ci/micromamba/init.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Make sure we source the script if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then echo "ERROR: This script must be 'sourced':" @@ -38,7 +39,13 @@ ENV_NAME="${1:-dev}" log "Environment: $ENV_NAME" # Get the location of this script -THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +if [ -n "$ZSH_VERSION" ]; then + RAW_SOURCE="${(%):-%x}" +else + RAW_SOURCE="${BASH_SOURCE[0]}" +fi + +THIS_DIR="$( cd "$( dirname "$RAW_SOURCE" )" &> /dev/null && pwd )" log "Location: $THIS_DIR" # Check if we have environment file