1
0
Fork 0
mirror of https://github.com/gohugoio/hugo.git synced 2025-04-22 08:59:13 +00:00

hugolib: Fix the GOMAXPROCS env get

Fixes 
This commit is contained in:
Bjørn Erik Pedersen 2019-04-05 09:31:16 +02:00
parent 8559f5c29f
commit 415ca9673d
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -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
}
}