diff --git a/version/version.go b/version/version.go index 17a74a338..98e3892e6 100644 --- a/version/version.go +++ b/version/version.go @@ -134,6 +134,11 @@ var getEmbeddedInfo = lazy.SyncFunc(func() embeddedInfo { ret.dirty = true } } + if ret.commit == "" || ret.commitDate == "" { + // Build info is present in the binary, but has no useful data. Act as + // if it's missing. + return embeddedInfo{} + } return ret })