fix: print image path for NoImageMetadata (#8666)

This commit is contained in:
Nolan Lawson 2023-09-26 06:51:57 -07:00 committed by GitHub
parent 60684fad72
commit 9fe4b95969
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 NoImageMetadata image path error message

View file

@ -649,7 +649,7 @@ export const NoImageMetadata = {
name: 'NoImageMetadata',
title: 'Could not process image metadata.',
message: (imagePath: string | undefined) =>
`Could not process image metadata${imagePath ? ' for `${imagePath}`' : ''}.`,
`Could not process image metadata${imagePath ? ` for \`${imagePath}\`` : ''}.`,
hint: 'This is often caused by a corrupted or malformed image. Re-exporting the image from your image editor may fix this issue.',
} satisfies ErrorData;