diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2018-06-29 01:50:12 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2018-07-01 00:27:32 +0300 |
commit | ac868c9c0621296da046f5aca2cd8ce29ac2d985 (patch) | |
tree | b45d94d4976c7f08fff02a2c21d3ebe92f6749f5 /script | |
parent | c2fa0b1ebaf2fe59f04db91f97ddcbfabb95373e (diff) |
Get processor count with ruby (on linux and mac)
closes #7830
Diffstat (limited to 'script')
-rwxr-xr-x | script/configure_bundler | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script/configure_bundler b/script/configure_bundler index 67e6aa055..06ab723aa 100755 --- a/script/configure_bundler +++ b/script/configure_bundler @@ -2,6 +2,7 @@ # frozen_string_literal: true require_relative "../config/bundler_helper" +require "etc" rails_env = BundlerHelper.rails_env database = BundlerHelper.database @@ -13,7 +14,7 @@ def config(option) system("#{File.join(__dir__, '../bin/bundle')} config --local #{option}") end -config("jobs #{`nproc`}") +config("jobs #{Etc.nprocessors}") config("with #{database}") if rails_env == "production" |