refactor: enhance Docker Compose validation workflow to improve error handling

- Replaced the pipe with an array to handle directory names, ensuring that errors within the loop propagate correctly to the parent shell.
- Updated the loop structure for better reliability in processing the directories.
This commit is contained in:
Mauricio Siu
2025-12-14 00:00:54 -06:00
parent b7f7c9ffb8
commit dcc456d18b

View File

@@ -192,7 +192,11 @@ jobs:
exit 0
fi
echo "$DIRECTORIES" | while read -r template_dir; do
# Convert to array to avoid subshell issues with pipe
# This ensures ERROR=1 inside the loop propagates to the parent shell
mapfile -t DIRS_ARRAY <<< "$DIRECTORIES"
for template_dir in "${DIRS_ARRAY[@]}"; do
if [ -z "$template_dir" ]; then
continue
fi