fix: reset duplicate detection state between compose generation runs
Reset _seen_services and _service_sources arrays at the start of _generate_compose_impl to prevent state bleeding between multiple invocations. This fixes the test-duplicate-service-detection.sh test which fails when run due to global associative array state persisting between test cases. Fixes: #850
This commit is contained in:
parent
1170ecb2f0
commit
0f91efc478
1 changed files with 4 additions and 0 deletions
|
|
@ -313,6 +313,10 @@ _generate_compose_impl() {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Reset duplicate detection state for fresh run
|
||||||
|
_seen_services=()
|
||||||
|
_service_sources=()
|
||||||
|
|
||||||
# Initialize duplicate detection with base services defined in the template
|
# Initialize duplicate detection with base services defined in the template
|
||||||
_record_service "forgejo" "base compose template" || return 1
|
_record_service "forgejo" "base compose template" || return 1
|
||||||
_record_service "woodpecker" "base compose template" || return 1
|
_record_service "woodpecker" "base compose template" || return 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue