Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

Commit 02dd238

Browse files
committed
Warn about duplicate packages in trash.yml
1 parent b368973 commit 02dd238

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

conf/yaml.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package conf
33
import (
44
"os"
55

6+
"github.com/Sirupsen/logrus"
67
yaml "github.com/cloudfoundry-incubator/candiedyaml"
78
)
89

@@ -35,7 +36,8 @@ func (t *Trash) deleteDups() {
3536
seen := make(map[string]bool)
3637
uniq := make([]Import, 0, len(t.Imports))
3738
for _, i := range t.Imports {
38-
if _, ok := seen[i.Package]; ok {
39+
if seen[i.Package] {
40+
logrus.Warnf("Package '%s' has duplicates (in trash.yml)", i.Package)
3941
continue
4042
}
4143
uniq = append(uniq, i)

0 commit comments

Comments
 (0)