Classify resolved configuration mistakes as input errors

This commit is contained in:
2026-12-02 19:34:13 +00:00
parent adf4dc87e0
commit 21d4eebb5e
7 changed files with 121 additions and 9 deletions

View File

@@ -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