mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
cli: fix bug with 'vault read -field=...' when the field value contains a printf formatting verb (#2109)
This commit is contained in:
committed by
Jeff Mitchell
parent
6165c3e20f
commit
9571df6bc6
@@ -79,7 +79,7 @@ func PrintRawField(ui cli.Ui, secret *api.Secret, field string) int {
|
||||
// directly print the message. If mitchellh/cli exposes method
|
||||
// to print without CR, this check needs to be removed.
|
||||
if reflect.TypeOf(ui).String() == "*cli.BasicUi" {
|
||||
fmt.Fprintf(os.Stdout, fmt.Sprintf("%v", val))
|
||||
fmt.Fprintf(os.Stdout, "%v", val)
|
||||
} else {
|
||||
ui.Output(fmt.Sprintf("%v", val))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user