From b7f7c9ffb8aaa32e471502201adda97e0a943034 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 13 Dec 2025 23:51:28 -0600 Subject: [PATCH] fix: improve Docker Compose validation workflow to handle subshell issues - Converted the handling of COMPOSE_FILES from a pipe to an array to ensure error propagation in the parent shell. - Updated the loop to iterate over the array for better reliability in the validation process. --- .github/workflows/validate-docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-docker-compose.yml b/.github/workflows/validate-docker-compose.yml index 945beeef..792b3703 100644 --- a/.github/workflows/validate-docker-compose.yml +++ b/.github/workflows/validate-docker-compose.yml @@ -147,7 +147,11 @@ jobs: exit 0 fi - echo "$COMPOSE_FILES" | while read -r compose_file; do + # Convert to array to avoid subshell issues with pipe + # This ensures ERROR=1 inside the loop propagates to the parent shell + mapfile -t COMPOSE_ARRAY <<< "$COMPOSE_FILES" + + for compose_file in "${COMPOSE_ARRAY[@]}"; do if [ -z "$compose_file" ]; then continue fi