mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
version: fix version output for "go run"
Before (note attempted use of absent date and commit hash): "short": "1.37.0-dev", "long": "1.37.0-dev-t", After: "short": "1.37.0-ERR-BuildInfo", "long": "1.37.0-ERR-BuildInfo", Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
70a2929a12
commit
b64d900f0f
@ -134,6 +134,11 @@ func (i embeddedInfo) commitAbbrev() string {
|
|||||||
ret.dirty = true
|
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
|
return ret
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user