call file config validate in cli post load

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Alex Goodman
2025-12-10 13:24:34 -05:00
parent a05608a4c8
commit 703edff876
6 changed files with 25 additions and 30 deletions
+5
View File
@@ -303,6 +303,11 @@ func (cfg *Catalog) PostLoad() error {
return fmt.Errorf("cannot enable exclude-binary-overlap-by-ownership without enabling package-file-ownership-overlap")
}
// validate file executable options
if err := cfg.ToFilesConfig().Executable.Validate(); err != nil {
return fmt.Errorf("invalid file executable configuration: %w", err)
}
return nil
}
@@ -31,8 +31,7 @@ func TestAllPackageCatalogersReachableInTasks(t *testing.T) {
taskFactories := task.DefaultPackageTaskFactories()
taskTagsByName := make(map[string][]string)
for _, factory := range taskFactories {
tsk, err := factory(task.DefaultCatalogingFactoryConfig())
require.NoError(t, err)
tsk := factory(task.DefaultCatalogingFactoryConfig())
if taskTagsByName[tsk.Name()] != nil {
t.Fatalf("duplicate task name: %q", tsk.Name())
}