aboutsummaryrefslogtreecommitdiffstats
path: root/internal/build/env.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/build/env.go')
-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 == "" {