mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-06 02:05:49 +02:00
remove dedupes
This commit is contained in:
+10
-1
@@ -710,7 +710,16 @@ func filesToSave(deps []string) ([]string, error) {
|
||||
srcFiles = append(srcFiles, f)
|
||||
}
|
||||
}
|
||||
return srcFiles, nil
|
||||
// remove duplicates
|
||||
deduped := []string{}
|
||||
m := map[string]struct{}{}
|
||||
for _, f := range srcFiles {
|
||||
if _, ok := m[f]; !ok {
|
||||
deduped = append(deduped, f)
|
||||
m[f] = struct{}{}
|
||||
}
|
||||
}
|
||||
return deduped, nil
|
||||
}
|
||||
|
||||
func fetchExtraStages(stages []config.KanikoStage, opts *config.KanikoOptions) error {
|
||||
|
||||
Reference in New Issue
Block a user