A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cloudfoundry/cli/commit/f10828d071cc9db993dbb663cd581b088aa5f162 below:

Remove explicit cli version check from plugin system (#3503) · cloudfoundry/cli@f10828d · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+2

-13

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+2

-13

lines changed Original file line number Diff line number Diff line change

@@ -6,8 +6,6 @@ import (

6 6

"sort"

7 7

"strings"

8 8 9 -

"github.com/blang/semver/v4"

10 - 11 9

"code.cloudfoundry.org/cli/actor/actionerror"

12 10

"code.cloudfoundry.org/cli/api/plugin"

13 11

"code.cloudfoundry.org/cli/util/configv3"

@@ -88,10 +86,6 @@ func (actor Actor) GetAndValidatePlugin(pluginMetadata PluginMetadata, commandLi

88 86

return configv3.Plugin{}, actionerror.PluginInvalidError{Err: err}

89 87

}

90 88 91 -

cliVersion, err := semver.Make(actor.config.BinaryVersion())

92 -

if err != nil {

93 -

return configv3.Plugin{}, actionerror.PluginInvalidError{Err: err}

94 -

}

95 89

var pluginLibraryMajorVersion int

96 90

hasPluginLibraryVersion := plugin.LibraryVersion != configv3.PluginVersion{}

97 91

if !hasPluginLibraryVersion {

@@ -100,13 +94,8 @@ func (actor Actor) GetAndValidatePlugin(pluginMetadata PluginMetadata, commandLi

100 94

pluginLibraryMajorVersion = plugin.LibraryVersion.Major

101 95

}

102 96 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{}

110 99

}

111 100 112 101

installedPlugins := actor.config.Plugins()

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4