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