From: Bjørn Erik Pedersen Date: Fri, 5 Apr 2019 07:31:16 +0000 (+0200) Subject: hugolib: Fix the GOMAXPROCS env get X-Git-Tag: v0.55.0~15 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=415ca9673d3bd3c06ab94f3d83897c892fce5f27;p=brevno-suite%2Fhugo hugolib: Fix the GOMAXPROCS env get Fixes #5813 --- diff --git a/hugolib/site.go b/hugolib/site.go index 1bf2d639..84ee7823 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -1883,7 +1883,7 @@ func (s *Site) newPage(kind string, sections ...string) *pageState { func getGoMaxProcs() int { if gmp := os.Getenv("GOMAXPROCS"); gmp != "" { - if p, err := strconv.Atoi(gmp); err != nil { + if p, err := strconv.Atoi(gmp); err == nil { return p } }