cli-plugins/manager: ListPlugins: return early if no candidates
Skip the other logic, which includes listing all commands provided; if there's no plugin-candidates, those steps won't be needed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
40725aea3c
commit
d1a19d4476
@ -151,6 +151,9 @@ func ListPlugins(dockerCli config.Provider, rootcmd *cobra.Command) ([]Plugin, e
|
||||
}
|
||||
|
||||
candidates := listPluginCandidates(pluginDirs)
|
||||
if len(candidates) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var plugins []Plugin
|
||||
var mu sync.Mutex
|
||||
|
Loading…
x
Reference in New Issue
Block a user