We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9315bc9 commit ee58202Copy full SHA for ee58202
internal/build/env.go
@@ -84,7 +84,9 @@ func LocalEnv() Environment {
84
env.Commit = RunGit("rev-parse", "HEAD")
85
}
86
if env.Branch == "" {
87
- env.Branch = RunGit("symbolic-ref", "-q", "--short", "HEAD")
+ if b := RunGit("rev-parse", "--abbrev-ref", "HEAD"); b != "HEAD" {
88
+ env.Branch = b
89
+ }
90
91
// Note that we don't get the current git tag. It would slow down
92
// builds and isn't used by anything.
0 commit comments