From 9571df6bc6c8f43ed26788720bdb26effb3f9726 Mon Sep 17 00:00:00 2001 From: Kyle McCullough Date: Tue, 22 Nov 2016 11:30:23 -0600 Subject: [PATCH] cli: fix bug with 'vault read -field=...' when the field value contains a printf formatting verb (#2109) --- command/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/util.go b/command/util.go index 990416d9f4..0ec3916a70 100644 --- a/command/util.go +++ b/command/util.go @@ -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)) }