Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05d59c59 authored by LaMont Jones's avatar LaMont Jones
Browse files

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
parent 8e2a6b1f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -439,7 +439,8 @@ func ReadReleaseConfigMaps(releaseConfigMapPaths StringList, targetRelease strin

	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 @@ func ReadReleaseConfigMaps(releaseConfigMapPaths StringList, targetRelease strin
		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.