Skip to content

Commit 2b95d7b

Browse files
fix: only batch prefetch more than one plugin
1 parent 9111603 commit 2b95d7b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/plugin/discovery/discovery.go

+5
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,15 @@ func (d *Discovery) FindPluginsWithBatchResolver(resolverName string, pInfos []*
124124
pInfo.BinPath = binPath
125125
}
126126

127+
// no plugins need to be downloaded
127128
if len(missingPlugins) == 0 {
128129
return nil
129130
}
130131

132+
if len(missingPlugins) == 1 {
133+
return fmt.Errorf("no batch prefetching possible for a single plugin")
134+
}
135+
131136
batchResolver := d.resolvers[resolverName].(resolver.BatchResolver)
132137
batchDownloadInfo, err := batchResolver.BatchResolvePlugins(missingPlugins)
133138
if err != nil {

0 commit comments

Comments
 (0)