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.
This commit is contained in:
Mauricio Siu
2025-12-13 23:51:28 -06:00
parent 30ecc96168
commit b7f7c9ffb8

View File

@@ -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