diff --git a/bundler.js b/bundler.js index 4d96bdd..b4f344c 100644 --- a/bundler.js +++ b/bundler.js @@ -195,7 +195,7 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer } // Number of jobs should scale with runner, up to a point - const jobs = Math.min(os.cpus().length, 8) + const jobs = Math.min(os.availableParallelism(), 8) // Always run 'bundle install' to list the gems await exec.exec('bundle', ['install', '--jobs', jobs]) diff --git a/dist/index.js b/dist/index.js index 3b0e557..934a1cd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -209,7 +209,7 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b } // Number of jobs should scale with runner, up to a point - const jobs = Math.min(os.cpus().length, 8) + const jobs = Math.min(os.availableParallelism(), 8) // Always run 'bundle install' to list the gems await exec.exec('bundle', ['install', '--jobs', jobs])