Explicitly check each exclusion in array instead of relying on implicit concatenation.
Add -d to docker compose up Add --remove-orphans to docker compose down
This commit is contained in:
@@ -9,14 +9,16 @@ do
|
||||
folder=$(basename "$dir")
|
||||
|
||||
# Skip if folder is in the exclusions array
|
||||
if [[ " ${exclusions[@]} " =~ " $folder " ]]; then
|
||||
continue
|
||||
fi
|
||||
for exclusion in "${exclusions[@]}"; do
|
||||
if [[ "$folder" = "$exclusion" ]]; then
|
||||
continue 2
|
||||
fi
|
||||
done
|
||||
|
||||
cd "$dir" || {
|
||||
echo "Failed to enter directory: $dir"
|
||||
continue
|
||||
}
|
||||
|
||||
docker compose down
|
||||
docker compose down --remove-orphans
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user