Commit f9c48c86 authored by Clayton Coleman's avatar Clayton Coleman

Don't add 'error: ' to messages if already there

parent 6397b781
...@@ -128,7 +128,10 @@ func checkErr(err error, handleErr func(string)) { ...@@ -128,7 +128,10 @@ func checkErr(err error, handleErr func(string)) {
msg, ok := StandardErrorMessage(err) msg, ok := StandardErrorMessage(err)
if !ok { if !ok {
msg = fmt.Sprintf("error: %s", err.Error()) msg = err.Error()
if !strings.HasPrefix(msg, "error: ") {
msg = fmt.Sprintf("error: %s", msg)
}
} }
handleErr(msg) handleErr(msg)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment