Classify resolved configuration mistakes as input errors
This commit is contained in:
@@ -27,10 +27,10 @@ func validateProductDestinations(cfg *Config, catalog *ArtifactCatalog) error {
|
||||
}
|
||||
destination = filepath.Clean(destination)
|
||||
if filepath.Dir(destination) != filepath.Join(root, category) {
|
||||
return fmt.Errorf("%s destination %q must be directly under %s/", producer, configured, category)
|
||||
return domainInputErrorf("%s destination %q must be directly under %s/", producer, configured, category)
|
||||
}
|
||||
if previous, exists := owners[destination]; exists {
|
||||
return fmt.Errorf("%s and %s both produce %q", previous, producer, destination)
|
||||
return domainInputErrorf("%s and %s both produce %q", previous, producer, destination)
|
||||
}
|
||||
owners[destination] = producer
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user