mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Don't add 'error: ' to messages if already there
This commit is contained in:
parent
6397b781ac
commit
f9c48c864d
@ -128,7 +128,10 @@ func checkErr(err error, handleErr func(string)) {
|
||||
|
||||
msg, ok := StandardErrorMessage(err)
|
||||
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user