diff --git a/opts.go b/opts.go index d807989..b536d35 100644 --- a/opts.go +++ b/opts.go @@ -322,6 +322,7 @@ func checkPluginExists(c *libcni, confList *cnilibrary.NetworkConfigList) error if !fileExistsInDir(dir, plugin) { missing[plugin] = plugin } else { + delete(missing, plugin) break } } @@ -333,7 +334,7 @@ func checkPluginExists(c *libcni, confList *cnilibrary.NetworkConfigList) error plugins = append(plugins, k) } - return fmt.Errorf("unable to find cni plugins %s in directories %s: %w", + return fmt.Errorf("unable to find cni plugins %s in directories %s: %v", strings.Join(plugins, ", "), strings.Join(c.pluginDirs, ", "), ErrCNIPluginNotFound) }