mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Output full secret path in certain kv commands (#14301)
* Full secret path in table output of get and put * Add path output to KV patch and metadata get * Add changelog * Don't print secret path for kv-v1 * Make more readable * Switch around logic to not swallow error * Add test for secret path * Fix metadata test * Add unit test for padequalsigns * Remove wonky kv get tests
This commit is contained in:
@@ -185,6 +185,13 @@ func (c *KVPatchCommand) Run(args []string) int {
|
||||
return code
|
||||
}
|
||||
|
||||
if Format(c.UI) == "table" {
|
||||
outputPath(c.UI, path, "Secret Path")
|
||||
metadata := secret.Data
|
||||
c.UI.Info(getHeaderForMap("Metadata", metadata))
|
||||
return OutputData(c.UI, metadata)
|
||||
}
|
||||
|
||||
return OutputSecret(c.UI, secret)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user