Don't panic when a map is included twice
If a map was included twice, we had side effects when skipping the extra
inclusion.
Bug: 340659219
Test: manual, TH
Change-Id: I90c55a800ecad932f8f67cf6f9f60dba571f7c48
diff --git a/cmd/release_config/release_config_lib/release_configs.go b/cmd/release_config/release_config_lib/release_configs.go
index 2487f2e..0b65658 100644
--- a/cmd/release_config/release_config_lib/release_configs.go
+++ b/cmd/release_config/release_config_lib/release_configs.go
@@ -439,7 +439,8 @@
configs := ReleaseConfigsFactory()
mapsRead := make(map[string]bool)
- for idx, releaseConfigMapPath := range releaseConfigMapPaths {
+ var idx int
+ for _, releaseConfigMapPath := range releaseConfigMapPaths {
// Maintain an ordered list of release config directories.
configDir := filepath.Dir(releaseConfigMapPath)
if mapsRead[configDir] {
@@ -454,6 +455,7 @@
if err != nil {
return nil, err
}
+ idx += 1
}
// Now that we have all of the release config maps, can meld them and generate the artifacts.