diff --git a/internal/modifier/cdi.go b/internal/modifier/cdi.go index 71c4e00c..96d0c665 100644 --- a/internal/modifier/cdi.go +++ b/internal/modifier/cdi.go @@ -101,8 +101,8 @@ func (m cdiModifier) Modify(spec *specs.Spec) error { cdi.WithSpecDirs(m.specDirs...), cdi.WithAutoRefresh(false), ) - if errs := registry.GetErrors(); len(errs) > 0 { - m.logger.Debugf("The following errors were triggered when creating the CDI registry: %v", errs) + if err := registry.Refresh(); err != nil { + m.logger.Debugf("The following error was triggered when refreshing the CDI registry: %v", err) } devices := m.devices