File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 66 "sort"
77 "strings"
88
9- "github.com/blang/semver/v4"
10-
119 "code.cloudfoundry.org/cli/actor/actionerror"
1210 "code.cloudfoundry.org/cli/api/plugin"
1311 "code.cloudfoundry.org/cli/util/configv3"
@@ -88,10 +86,6 @@ func (actor Actor) GetAndValidatePlugin(pluginMetadata PluginMetadata, commandLi
8886 return configv3.Plugin {}, actionerror.PluginInvalidError {Err : err }
8987 }
9088
91- cliVersion , err := semver .Make (actor .config .BinaryVersion ())
92- if err != nil {
93- return configv3.Plugin {}, actionerror.PluginInvalidError {Err : err }
94- }
9589 var pluginLibraryMajorVersion int
9690 hasPluginLibraryVersion := plugin .LibraryVersion != configv3.PluginVersion {}
9791 if ! hasPluginLibraryVersion {
@@ -100,13 +94,8 @@ func (actor Actor) GetAndValidatePlugin(pluginMetadata PluginMetadata, commandLi
10094 pluginLibraryMajorVersion = plugin .LibraryVersion .Major
10195 }
10296
103- switch cliVersion .Major {
104- case 6 , 7 , 8 :
105- if pluginLibraryMajorVersion > 1 {
106- return configv3.Plugin {}, actionerror.PluginInvalidLibraryVersionError {}
107- }
108- default :
109- panic ("unrecognized major version" )
97+ if pluginLibraryMajorVersion > 1 {
98+ return configv3.Plugin {}, actionerror.PluginInvalidLibraryVersionError {}
11099 }
111100
112101 installedPlugins := actor .config .Plugins ()
You can’t perform that action at this time.
0 commit comments