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

Commit 8366ae9

Browse files
committed
Merge pull request #31 from imikushin/warn-dups
Warn about duplicate packages in trash.yml
2 parents b368973 + 02dd238 commit 8366ae9

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)