invoke: correctly infer version for 0.1.0-vintage plugins
Older plugins return a known error when issued the VERSION command. Capture this error and report it as a 0.1.0 version plugin.
This commit is contained in:
@ -67,8 +67,6 @@ func (c *CNIConfig) GetVersionInfo(pluginType string) (version.PluginInfo, error
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO: if error is because plugin is old and VERSION command is unrecognized
|
||||
// then do the right thing and return version.PluginSupports("0.1.0"), nil
|
||||
return invoke.ExecPluginForVersion(pluginPath)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user