Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Line duplicate detection error messages up
Browse files Browse the repository at this point in the history
  • Loading branch information
squaremo committed Nov 13, 2019
1 parent ad813e8 commit 1e2abd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/manifests/configaware.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,16 @@ func (ca *configAware) getResourcesByID(ctx context.Context) (map[string]resourc
// detected by the parsing code). But were that to
// change, e.g., if `resources` were a slice of
// resources, we would want to catch it here.
duplicateErr = fmt.Errorf("duplicate definitions of resource %s generated by %s",
duplicateErr = fmt.Errorf("duplicate definition of '%s' (generated by %s)",
id, cf.ConfigRelativeToWorkingDir())
case duplicate.configFile != nil:
// the duplicate is from another config file
dupCf := duplicate.configFile
duplicateErr = fmt.Errorf("duplicate definition of resource %s generated by %s and %s",
duplicateErr = fmt.Errorf("duplicate definition of '%s' (generated by %s and by %s)",
id, cf.ConfigRelativeToWorkingDir(), dupCf.ConfigRelativeToWorkingDir())
default:
// the duplicate is from a raw file
duplicateErr = fmt.Errorf("duplicate definition of resource %s generated by %s and in file %s",
duplicateErr = fmt.Errorf("duplicate definition of '%s' (generated by %s and in %s)",
id, cf.ConfigRelativeToWorkingDir(), duplicate.resource.Source())
}
return nil, duplicateErr
Expand Down

0 comments on commit 1e2abd6

Please sign in to comment.