mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 09:42:25 +00:00
Skip Formatting For NIL Secret (#18163)
* Skip formatting for a nil secret data * Same change for put * Add changelog * update changelog * modify filtered output
This commit is contained in:
committed by
GitHub
parent
ec97e633db
commit
06b4def568
3
changelog/18163.txt
Normal file
3
changelog/18163.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
cli/kv: skip formatting of nil secrets for patch and put with field parameter set
|
||||
```
|
||||
@@ -252,6 +252,14 @@ func (c *KVPatchCommand) Run(args []string) int {
|
||||
if code != 0 {
|
||||
return code
|
||||
}
|
||||
if secret == nil {
|
||||
// Don't output anything if there's no secret
|
||||
return 0
|
||||
}
|
||||
|
||||
if c.flagField != "" {
|
||||
return PrintRawField(c.UI, secret, c.flagField)
|
||||
}
|
||||
|
||||
if Format(c.UI) == "table" {
|
||||
outputPath(c.UI, fullPath, "Secret Path")
|
||||
|
||||
Reference in New Issue
Block a user