Merge pull request #1425 from ucb-bar/abejgonzalez-patch-3

Ensure conda cleanup regex properly filters out non-numeric chars
This commit is contained in:
Jerry Zhao
2023-04-04 15:09:34 -07:00
committed by GitHub

View File

@@ -15,7 +15,7 @@ runs:
conda env remove -n $env
done
fi
IS_NUMBER_REGEX='[0-9]+$'
IS_NUMBER_REGEX='^[0-9]+$'
conda env list | awk '{print $1}' | tail -n +4 | while read envname; do
ENV_DATE=$(echo $envname | sed "s/cy-[[:digit:]]\+-\(.*\)-\(riscv\|esp\)-tools/\1/")
if ! [[ $ENV_DATE =~ $IS_NUMBER_REGEX ]]; then