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:
parent
495c503b11
commit
afdb571319
|
@ -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 {
|
if code != 0 {
|
||||||
return code
|
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" {
|
if Format(c.UI) == "table" {
|
||||||
outputPath(c.UI, fullPath, "Secret Path")
|
outputPath(c.UI, fullPath, "Secret Path")
|
||||||
|
|
Loading…
Reference in New Issue