diff --git a/pkg/plugin/discovery/discovery.go b/pkg/plugin/discovery/discovery.go index 4cd82a07..f077e9a5 100644 --- a/pkg/plugin/discovery/discovery.go +++ b/pkg/plugin/discovery/discovery.go @@ -124,10 +124,15 @@ func (d *Discovery) FindPluginsWithBatchResolver(resolverName string, pInfos []* pInfo.BinPath = binPath } + // no plugins need to be downloaded if len(missingPlugins) == 0 { return nil } + if len(missingPlugins) == 1 { + return fmt.Errorf("no batch prefetching possible for a single plugin") + } + batchResolver := d.resolvers[resolverName].(resolver.BatchResolver) batchDownloadInfo, err := batchResolver.BatchResolvePlugins(missingPlugins) if err != nil {