superenv: fix make_jobs regular expression

HOMEBREW_MAKE_JOBS can be a multidigit number. The regex should match
the entire number not just the last digit.

Closes Homebrew/homebrew#50016.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
This commit is contained in:
ilovezfs 2016-03-11 03:34:47 -08:00 committed by Xu Cheng
parent 23ee1ee499
commit 1e1184fc2d

View File

@ -263,7 +263,7 @@ module Superenv
alias_method :j1, :deparallelize
def make_jobs
self["MAKEFLAGS"] =~ /-\w*j(\d)+/
self["MAKEFLAGS"] =~ /-\w*j(\d+)/
[$1.to_i, 1].max
end