Skip to content

Commit

Permalink
fix(assets): Prevent concurrency from being set to 0 (#9460)
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Dec 18, 2023
1 parent 76b4e55 commit 047d285
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/real-bags-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix Astro failing to build on certain exotic platform that reports their CPU count incorrectly
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 047d285

Please sign in to comment.