Fix panic when specifying multiple excludeFiles directives

Fixes #9076
This commit is contained in:
Bjørn Erik Pedersen
2021-10-25 12:18:00 +02:00
parent b959ecbc81
commit 64e1613fb3
3 changed files with 10 additions and 4 deletions

View File

@@ -149,13 +149,13 @@ func (m *ModulesConfig) finalize(logger loggers.Logger) error {
func filterUnwantedMounts(mounts []Mount) []Mount {
// Remove duplicates
seen := make(map[Mount]bool)
seen := make(map[string]bool)
tmp := mounts[:0]
for _, m := range mounts {
if !seen[m] {
if !seen[m.key()] {
tmp = append(tmp, m)
}
seen[m] = true
seen[m.key()] = true
}
return tmp
}