diff --git a/cli/cli.go b/cli/cli.go index 9a0205a8..cb747f96 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -37,7 +37,7 @@ import ( // Application info const ( APP = "bibop" - VER = "4.8.0" + VER = "4.8.1" DESC = "Utility for testing command-line tools" ) @@ -312,12 +312,20 @@ func getRenderer() render.Renderer { // printError prints error message to console func printError(f string, a ...interface{}) { - fmtc.Fprintf(os.Stderr, "{r}"+f+"{!}\n", a...) + if len(a) == 0 { + fmtc.Fprintln(os.Stderr, "{r}"+f+"{!}") + } else { + fmtc.Fprintf(os.Stderr, "{r}"+f+"{!}\n", a...) + } } // printError prints warning message to console func printWarn(f string, a ...interface{}) { - fmtc.Fprintf(os.Stderr, "{y}"+f+"{!}\n", a...) + if len(a) == 0 { + fmtc.Fprintln(os.Stderr, "{y}"+f+"{!}") + } else { + fmtc.Fprintf(os.Stderr, "{y}"+f+"{!}\n", a...) + } } // printErrorAndExit print error mesage and exit with exit code 1