0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-24 23:21:57 -05:00

fix(assets): Prevent concurrency from being set to 0 (#9460)

This commit is contained in:
Erika 2023-12-18 12:49:54 -05:00 committed by GitHub
parent 76b4e55894
commit 047d285be1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix Astro failing to build on certain exotic platform that reports their CPU count incorrectly

View file

@ -220,7 +220,7 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn
.reduce((a, b) => a + b, 0);
const cpuCount = os.cpus().length;
const assetsCreationEnvironment = await prepareAssetsGenerationEnv(pipeline, totalCount);
const queue = new PQueue({ concurrency: cpuCount });
const queue = new PQueue({ concurrency: Math.max(cpuCount, 1) });
const assetsTimer = performance.now();
for (const [originalPath, transforms] of staticImageList) {