aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorferhat elmas <elmas.ferhat@gmail.com>2018-02-12 17:18:35 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-02-12 17:18:35 +0800
commit52ad848b2ef5f4c03156f18898e57f303636f52b (patch)
tree76ae0d148dd730ce4eae5c80b394aa17362c74ef
parent4065695350d99247fd74c69079be7dc7edb5ed2c (diff)
downloadgo-tangerine-52ad848b2ef5f4c03156f18898e57f303636f52b.tar
go-tangerine-52ad848b2ef5f4c03156f18898e57f303636f52b.tar.gz
go-tangerine-52ad848b2ef5f4c03156f18898e57f303636f52b.tar.bz2
go-tangerine-52ad848b2ef5f4c03156f18898e57f303636f52b.tar.lz
go-tangerine-52ad848b2ef5f4c03156f18898e57f303636f52b.tar.xz
go-tangerine-52ad848b2ef5f4c03156f18898e57f303636f52b.tar.zst
go-tangerine-52ad848b2ef5f4c03156f18898e57f303636f52b.zip
internal/build: fix usage of strings.TrimLeft (#16066)
-rw-r--r--internal/build/env.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/build/env.go b/internal/build/env.go
index c9848bf82..b553e0ed8 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 == "" {