From 52ad848b2ef5f4c03156f18898e57f303636f52b Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Mon, 12 Feb 2018 10:18:35 +0100 Subject: [PATCH] internal/build: fix usage of strings.TrimLeft (#16066) --- internal/build/env.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/build/env.go b/internal/build/env.go index c9848bf82c..b553e0ed80 100644 --- a/internal/build/env.go +++ b/internal/build/env.go @@ -94,7 +94,7 @@ func LocalEnv() Environment { } if env.Branch == "" { if head != "HEAD" { - env.Branch = strings.TrimLeft(head, "refs/heads/") + env.Branch = strings.TrimPrefix(head, "refs/heads/") } } if info, err := os.Stat(".git/objects"); err == nil && info.IsDir() && env.Tag == "" {