We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82c4c57 commit c1c0880Copy full SHA for c1c0880
build.mjs
@@ -32,14 +32,7 @@ if (cacheCompressionEnv != null) {
32
cacheCompressionOption = false
33
}
34
35
-let cpuCount = 1
36
-try {
37
- const cpuInfo = os.cpus && os.cpus()
38
- const len = Array.isArray(cpuInfo) ? cpuInfo.length : 0
39
- cpuCount = Number.isInteger(len) && len > 0 ? len : 1
40
-} catch {
41
- cpuCount = 1
42
-}
+const cpuCount = Math.max(1, os.cpus()?.length || 1)
43
const rawWorkers = process.env.BUILD_THREAD_WORKERS
44
? parseInt(process.env.BUILD_THREAD_WORKERS, 10)
45
: undefined
0 commit comments