From 89056407429dbfe37eaf0d93dd26eeb09484e712 Mon Sep 17 00:00:00 2001 From: George Taylor Date: Mon, 21 Oct 2024 11:00:04 +0100 Subject: [PATCH] Update migrate-s3.yaml --- .github/workflows/migrate-s3.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/migrate-s3.yaml b/.github/workflows/migrate-s3.yaml index 28bed3b..2cf3a61 100644 --- a/.github/workflows/migrate-s3.yaml +++ b/.github/workflows/migrate-s3.yaml @@ -65,13 +65,13 @@ jobs: prefixes=$(kubectl exec $SERVICE_POD_NAME -- aws s3api list-objects-v2 --bucket $SRC_BUCKET --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text) # remove all spaces and put one comma between prefixes - cleaned_prefixes=$(echo $prefixes | tr ' ' ',') + cleaned_prefixes=$(echo $prefixes | tr -s '[:space:]' ',') DIRS="" IFS=',' for prefix in $cleaned_prefixes; do DIR=$(kubectl exec $SERVICE_POD_NAME -- aws s3api list-objects-v2 --bucket $SRC_BUCKET --prefix "$prefix" --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text) if [ -n "$DIR" ]; then - DIR=$(echo $DIR | tr ' ' ',') + DIR=$(echo $DIR | tr -s '[:space:]' ',') DIRS="${DIRS}${DIR}," fi done