File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,12 +127,18 @@ if [[ "$MODE" == "source" ]]; then
127127 exit 1
128128 fi
129129
130+ # Prepare flags - --strict-channel-priority only works with mamba/micromamba
131+ CHANNEL_PRIORITY_FLAG=" "
132+ if [[ " $COMMAND_PKG " != " conda" ]]; then
133+ CHANNEL_PRIORITY_FLAG=" --strict-channel-priority"
134+ fi
135+
130136 if $COMMAND_PKG env list | awk ' {print $1}' | grep -qx " $ENV_NAME " ; then
131137 echo " >>> Updating existing environment: $ENV_NAME "
132- $COMMAND_PKG env update -n " $ENV_NAME " -f environment.yml --prune --strict-channel-priority
138+ $COMMAND_PKG env update -n " $ENV_NAME " -f environment.yml --prune $CHANNEL_PRIORITY_FLAG
133139 else
134140 echo " >>> Creating new environment: $ENV_NAME "
135- $COMMAND_PKG env create -n " $ENV_NAME " -f environment.yml -y --strict-channel-priority
141+ $COMMAND_PKG env create -n " $ENV_NAME " -f environment.yml -y $CHANNEL_PRIORITY_FLAG
136142 fi
137143
138144 # ##############################################################################
You can’t perform that action at this time.
0 commit comments