Skip to content

Commit 0efdc22

Browse files
authored
fix: rethrow astroerrors in image processing (#13407)
1 parent 854b25e commit 0efdc22

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/small-masks-wink.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Displays correct error message when sharp isn't installed

packages/astro/src/assets/build/generate.ts

+3
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ export async function generateImagesForPath(
279279
)
280280
).data;
281281
} catch (e) {
282+
if (AstroError.is(e)) {
283+
throw e;
284+
}
282285
const error = new AstroError(
283286
{
284287
...AstroErrorData.CouldNotTransformImage,

0 commit comments

Comments
 (0)