Update backwards compat fix from 5913

This commit is contained in:
Jeff Mitchell
2018-12-12 15:36:28 -05:00
parent dbd195f895
commit b701df4757
4 changed files with 12 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
## 1.0.1 (unreleased)
FEATURES:
IMPROVEMENTS:
* cli: Strip iTerm extra characters from password manager input [GH-5837]
* ui: Added ability to search for Group and Policy IDs when creating Groups
@@ -9,6 +9,7 @@ FEATURES:
BUG FIXES:
* cli: Show correct stored keys/threshold for autoseals [GH-5910]
* cli: Fix backwards compatibility fallback when listing plugins [GH-5913]
* namespaces: Correctly reload the proper mount when tuning or reloading the
mount [GH-5937]
* secret/pki: Fix panic that could occur during tidy operation when malformed

View File

@@ -49,6 +49,9 @@ func (c *Sys) ListPlugins(i *ListPluginsInput) (*ListPluginsResponse, error) {
if err != nil && resp == nil {
return nil, err
}
if resp == nil {
return nil, nil
}
defer resp.Body.Close()
// We received an Unsupported Operation response from Vault, indicating

View File

@@ -353,6 +353,9 @@ func (p *Predict) plugins(pluginTypes ...consts.PluginType) []string {
if err != nil {
return nil
}
if result == nil {
return nil
}
for _, names := range result.PluginsByType {
for _, name := range names {
if _, ok := pluginsAdded[name]; !ok {

View File

@@ -96,6 +96,10 @@ func (c *PluginListCommand) Run(args []string) int {
c.UI.Error(fmt.Sprintf("Error listing available plugins: %s", err))
return 2
}
if resp == nil {
c.UI.Error("No response from server when listing plugins")
return 2
}
switch Format(c.UI) {
case "table":