Commit 52ad848b authored by ferhat elmas's avatar ferhat elmas Committed by Péter Szilágyi

internal/build: fix usage of strings.TrimLeft (#16066)

parent 40656953
......@@ -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 == "" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment