From 3849f36b46e3bd645a87e54cc097cfc98da15938 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 24 Dec 2025 17:32:34 +0000 Subject: [PATCH] Don't run while loop in subshell We need the variable writes to stick around. Also switch to an associative array so duplicates are removed. --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8d66c5509..3fe8cc4b7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -666,18 +666,18 @@ macOS15_Xcode16_arm64: - aws --version - mkdir -p incoming_artifacts - mv *.zip incoming_artifacts/ - - destinations=() + - declare -A destinations - | # todo: this will get upset by certain characters for merge_list in *_to-be-merged.txt; do - dos2unix < $merge_list | while IFS=: read -r partial destination; do - destinations+=("$destination") + while IFS=: read -r partial destination; do + destinations["$destination"]="" echo "Unzipping '$partial' to '$destination'" unzip -n -d "$destination" "incoming_artifacts/$partial" - done + done < <(dos2unix < $merge_list) done - | - for destination in ${destinations[@]}; do + for destination in ${!destinations[@]}; do pushd "$destination" for ci_id in CI-ID_*.txt; do cat "$ci_id" >> CI-ID.txt