if error is nil, do not strip extra info

This commit is contained in:
Brad Rydzewski
2019-11-01 09:32:54 -07:00
parent 2e1fc1a142
commit bcdce4415d

View File

@@ -13,6 +13,9 @@ import (
// from a Docker error. Specifically, on Windows, this can expose
// environment variables and other sensitive data.
func TrimExtraInfo(err error) error {
if err == nil {
return nil
}
s := err.Error()
i := strings.Index(s, "extra info:")
if i > 0 {