1
1
mirror of https://github.com/walles/moar.git synced 2024-08-16 15:30:34 +03:00

Make command line error messages more visible

Before this change I felt they just disappeared in the clutter from the
help text.
This commit is contained in:
Johan Walles 2023-03-02 07:17:05 +01:00
parent 5432ff567a
commit e17e6bdac2

View File

@ -260,7 +260,8 @@ func main() {
return
}
fmt.Fprintln(os.Stderr, "ERROR:", err.Error())
boldErrorMessage := "\x1b[1m" + err.Error() + "\x1b[m"
fmt.Fprintln(os.Stderr, "ERROR:", boldErrorMessage)
fmt.Fprintln(os.Stderr)
printUsage(os.Stderr, flagSet, true)
os.Exit(1)