Skip to content

Commit

Permalink
hugolib: Fix the GOMAXPROCS env get
Browse files Browse the repository at this point in the history
Fixes #5813
  • Loading branch information
bep committed Apr 5, 2019
1 parent 8559f5c commit 415ca96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hugolib/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 415ca96

Please sign in to comment.