Skip to content

Commit 047d285

Browse files
authoredDec 18, 2023
fix(assets): Prevent concurrency from being set to 0 (#9460)
1 parent 76b4e55 commit 047d285

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎.changeset/real-bags-hope.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Fix Astro failing to build on certain exotic platform that reports their CPU count incorrectly

‎packages/astro/src/core/build/generate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn
220220
.reduce((a, b) => a + b, 0);
221221
const cpuCount = os.cpus().length;
222222
const assetsCreationEnvironment = await prepareAssetsGenerationEnv(pipeline, totalCount);
223-
const queue = new PQueue({ concurrency: cpuCount });
223+
const queue = new PQueue({ concurrency: Math.max(cpuCount, 1) });
224224

225225
const assetsTimer = performance.now();
226226
for (const [originalPath, transforms] of staticImageList) {

0 commit comments

Comments
 (0)
Please sign in to comment.