Plugins: Update CLI check if plugin is already installed (#91213)
* check if plugin installed * undo remove initial vers check * still attempt deps
This commit is contained in:
@@ -88,14 +88,14 @@ func GetLocalPlugins(pluginDir string) []*plugins.FoundBundle {
|
||||
return res
|
||||
}
|
||||
|
||||
func PluginVersionInstalled(pluginID, version, pluginDir string) bool {
|
||||
func PluginVersionInstalled(pluginID, version, pluginDir string) (plugins.FoundPlugin, bool) {
|
||||
for _, bundle := range GetLocalPlugins(pluginDir) {
|
||||
pJSON := bundle.Primary.JSONData
|
||||
if pJSON.ID == pluginID {
|
||||
if pJSON.Info.Version == version {
|
||||
return true
|
||||
return bundle.Primary, true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return plugins.FoundPlugin{}, false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user