backport of commit 3130e8ba9483e10e6191d264dc97b597462bf7c1 (#22868)
This commit is contained in:
parent
2ae56bd4ac
commit
d019802cc0
3
changelog/22818.txt
Normal file
3
changelog/22818.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
cli: Fix the CLI failing to return wrapping information for KV PUT and PATCH operations when format is set to `table`.
|
||||||
|
```
|
|
@ -264,6 +264,11 @@ func (c *KVPatchCommand) Run(args []string) int {
|
||||||
return PrintRawField(c.UI, secret, c.flagField)
|
return PrintRawField(c.UI, secret, c.flagField)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the secret is wrapped, return the wrapped response.
|
||||||
|
if secret.WrapInfo != nil && secret.WrapInfo.TTL != 0 {
|
||||||
|
return OutputSecret(c.UI, secret)
|
||||||
|
}
|
||||||
|
|
||||||
if Format(c.UI) == "table" {
|
if Format(c.UI) == "table" {
|
||||||
outputPath(c.UI, fullPath, "Secret Path")
|
outputPath(c.UI, fullPath, "Secret Path")
|
||||||
metadata := secret.Data
|
metadata := secret.Data
|
||||||
|
|
|
@ -219,6 +219,11 @@ func (c *KVPutCommand) Run(args []string) int {
|
||||||
return PrintRawField(c.UI, secret, c.flagField)
|
return PrintRawField(c.UI, secret, c.flagField)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the secret is wrapped, return the wrapped response.
|
||||||
|
if secret.WrapInfo != nil && secret.WrapInfo.TTL != 0 {
|
||||||
|
return OutputSecret(c.UI, secret)
|
||||||
|
}
|
||||||
|
|
||||||
if Format(c.UI) == "table" {
|
if Format(c.UI) == "table" {
|
||||||
outputPath(c.UI, fullPath, "Secret Path")
|
outputPath(c.UI, fullPath, "Secret Path")
|
||||||
metadata := secret.Data
|
metadata := secret.Data
|
||||||
|
|
Loading…
Reference in a new issue