summaryrefslogtreecommitdiffstats
path: root/build.go
diff options
context:
space:
mode:
Diffstat (limited to 'build.go')
-rw-r--r--build.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/build.go b/build.go
index 872fffa7c1..838442bb31 100644
--- a/build.go
+++ b/build.go
@@ -1115,7 +1115,12 @@ func buildStamp() int64 {
return time.Now().Unix()
}
- s, _ := strconv.ParseInt(string(bs), 10, 64)
+ s, err := strconv.ParseInt(string(bs), 10, 64)
+ if err != nil {
+ // Fall back to "now".
+ log.Printf("Failed to parse git output: %q: %v", string(bs), err)
+ return time.Now().Unix()
+ }
return s
}