Skip to content

Commit 148b586

Browse files
committed
Use os.availableParallelism() instead of os.cpus().length
* As https://nodejs.org/api/os.html#oscpus says: os.cpus().length should not be used to calculate the amount of parallelism available to an application. Use os.availableParallelism() for this purpose.
1 parent 77709fc commit 148b586

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bundler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer
195195
}
196196

197197
// Number of jobs should scale with runner, up to a point
198-
const jobs = Math.min(os.cpus().length, 8)
198+
const jobs = Math.min(os.availableParallelism(), 8)
199199
// Always run 'bundle install' to list the gems
200200
await exec.exec('bundle', ['install', '--jobs', jobs])
201201

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)