mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
[VAULT-1324] Fix the CLI failing to return wrapping information for KV PUT and PATCH operations when format is set to 'table' (#22818)
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
// 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" {
|
||||
outputPath(c.UI, fullPath, "Secret Path")
|
||||
metadata := secret.Data
|
||||
|
||||
@@ -219,6 +219,11 @@ func (c *KVPutCommand) Run(args []string) int {
|
||||
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" {
|
||||
outputPath(c.UI, fullPath, "Secret Path")
|
||||
metadata := secret.Data
|
||||
|
||||
Reference in New Issue
Block a user