Skip to content

Commit 0a24371

Browse files
authored
cmd/aperture: tidy up version output when hash/date not available (#7)
1 parent 7309a08 commit 0a24371

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/aperture/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ func main() {
6060
flag.Parse()
6161

6262
if *flagVersion {
63-
fmt.Printf("%s (%s, %s)\n", buildVersion, buildCommit, buildDate)
63+
if buildCommit != "unknown" {
64+
fmt.Printf("%s (%s, %s)\n", buildVersion, buildCommit, buildDate)
65+
} else {
66+
fmt.Println(buildVersion)
67+
}
6468
os.Exit(0)
6569
}
6670

0 commit comments

Comments
 (0)