Skip to content

Commit

Permalink
Central Repo: Only sync plugins from context
Browse files Browse the repository at this point in the history
For the Central Repository feature, we no longer sync standalone plugins
but only plugins "recommended" by the context.

Signed-off-by: Marc Khouzam <kmarc@vmware.com>
  • Loading branch information
marckhouzam committed Jan 30, 2023
1 parent e119038 commit f49f84d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/pluginmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,16 @@ func DeletePlugin(options DeletePluginOptions) error {
return nil
}

// SyncPlugins automatically downloads all available plugins to users machine
// SyncPlugins automatically installs all plugins of the current contexts
func SyncPlugins() error {
log.Info("Checking for required plugins...")
plugins, err := AvailablePlugins()
var plugins []discovery.Discovered
var err error
if configlib.IsFeatureActivated(constants.FeatureCentralRepository) {
plugins, err = DiscoverServerPlugins()
} else {
plugins, err = AvailablePlugins()
}
if err != nil {
return err
}
Expand Down

0 comments on commit f49f84d

Please sign in to comment.