ENV.rb: Always return integers from make_jobs

When referencing `Hardware.processor_count`, `ENV.make_jobs` will return an
integer. If referencing the environment variable `HOMEBREW_MAKE_JOBS`, it
returned a string.

Now, the function always returns an integer.

Fixes Homebrew/homebrew#12033.
This commit is contained in:
Charlie Sharpsteen 2012-05-03 15:45:31 -07:00
parent 7b24382d14
commit 52834b8617

View File

@ -432,7 +432,7 @@ Please take one of the following actions:
def make_jobs
# '-j' requires a positive integral argument
if self['HOMEBREW_MAKE_JOBS'].to_i > 0
self['HOMEBREW_MAKE_JOBS']
self['HOMEBREW_MAKE_JOBS'].to_i
else
Hardware.processor_count
end