mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 22:12:28 +01:00
call file config validate in cli post load
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user