From 8ae40b55ecd0cca3a57980dc9e1bac7312f96635 Mon Sep 17 00:00:00 2001 From: Steven Chung Date: Tue, 20 Aug 2019 23:13:53 -0400 Subject: [PATCH] fix error formatting would interpret % as printf formatted strings Signed-off-by: Steven Chung --- changelogs/unreleased/1781-s12chung | 1 + pkg/cmd/errors.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/1781-s12chung diff --git a/changelogs/unreleased/1781-s12chung b/changelogs/unreleased/1781-s12chung new file mode 100644 index 0000000000..ebb563be21 --- /dev/null +++ b/changelogs/unreleased/1781-s12chung @@ -0,0 +1 @@ +fix error formatting due interpreting % as printf formatted strings diff --git a/pkg/cmd/errors.go b/pkg/cmd/errors.go index d6ff984b60..2ba4420a81 100644 --- a/pkg/cmd/errors.go +++ b/pkg/cmd/errors.go @@ -27,7 +27,7 @@ import ( func CheckError(err error) { if err != nil { if err != context.Canceled { - fmt.Fprintf(os.Stderr, fmt.Sprintf("An error occurred: %v\n", err)) + fmt.Fprintf(os.Stderr, "An error occurred: %v\n", err) } os.Exit(1) }