mirror of
https://github.com/Dokploy/templates.git
synced 2026-06-30 03:25:22 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user