From 50a311213644d74cdc9b2613c0b3938fd11ceeb8 Mon Sep 17 00:00:00 2001 From: Guangming Wang Date: Thu, 17 Oct 2019 20:30:06 +0800 Subject: [PATCH] fix string trim func in findErrorMessage func Signed-off-by: Guangming Wang --- pkg/git/operations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git/operations.go b/pkg/git/operations.go index 8cfac229f..dd6c533ca 100644 --- a/pkg/git/operations.go +++ b/pkg/git/operations.go @@ -469,7 +469,7 @@ func findErrorMessage(output io.Reader) string { case strings.HasPrefix(sc.Text(), "ERROR fatal: "): // Saw this error on ubuntu systems return sc.Text() case strings.HasPrefix(sc.Text(), "error:"): - return strings.Trim(sc.Text(), "error: ") + return strings.TrimPrefix(sc.Text(), "error: ") } } return ""