From 89a2458291793c9b71c967181c8f1a9b4a20baaa Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 4 Apr 2023 14:18:33 -0700 Subject: [PATCH] Ensure conda cleanup regex properly filters out non-numeric chars --- .github/actions/cleanup-conda/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/cleanup-conda/action.yml b/.github/actions/cleanup-conda/action.yml index 3b0fdf88..7958b0a4 100644 --- a/.github/actions/cleanup-conda/action.yml +++ b/.github/actions/cleanup-conda/action.yml @@ -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