Skip to content

Commit 8f0919c

Browse files
committed
CI: Fix download-spec with empty commit_hash
1 parent 109055d commit 8f0919c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/build/cmd/tools/commands/spec/command.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ func (c Command) Execute() (err error) {
9494
}
9595

9696
var build Build
97-
if build, err = findBuildByCommitHash(c.CommitHash, v.Version.Builds); err != nil {
97+
if c.CommitHash != "" {
98+
if build, err = findBuildByCommitHash(c.CommitHash, v.Version.Builds); err != nil {
99+
build = findMostRecentBuild(v.Version.Builds)
100+
}
101+
} else {
98102
build = findMostRecentBuild(v.Version.Builds)
99103
}
100104
if c.Debug {

0 commit comments

Comments
 (0)