diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/pom2mk/pom2mk.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/pom2mk/pom2mk.go b/cmd/pom2mk/pom2mk.go index d45067fc..80941608 100644 --- a/cmd/pom2mk/pom2mk.go +++ b/cmd/pom2mk/pom2mk.go @@ -360,6 +360,7 @@ The makefile is written to stdout, to be put in the current directory (often as poms := []*Pom{} modules := make(map[string]*Pom) + duplicate := false for _, filename := range filenames { pom, err := parse(filename) if err != nil { @@ -373,11 +374,15 @@ The makefile is written to stdout, to be put in the current directory (often as if old, ok := modules[key]; ok { fmt.Fprintln(os.Stderr, "Module", key, "defined twice:", old.PomFile, pom.PomFile) + duplicate = true } modules[key] = pom } } + if duplicate { + os.Exit(1) + } for _, pom := range poms { pom.FixDeps(modules) |