From 9fe4b9596988dc8b498825eae266805daf4b435b Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Tue, 26 Sep 2023 06:51:57 -0700 Subject: [PATCH] fix: print image path for NoImageMetadata (#8666) --- .changeset/gentle-rocks-enjoy.md | 5 +++++ packages/astro/src/core/errors/errors-data.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/gentle-rocks-enjoy.md diff --git a/.changeset/gentle-rocks-enjoy.md b/.changeset/gentle-rocks-enjoy.md new file mode 100644 index 000000000..4131672ca --- /dev/null +++ b/.changeset/gentle-rocks-enjoy.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fix NoImageMetadata image path error message diff --git a/packages/astro/src/core/errors/errors-data.ts b/packages/astro/src/core/errors/errors-data.ts index ace362cef..5f825126f 100644 --- a/packages/astro/src/core/errors/errors-data.ts +++ b/packages/astro/src/core/errors/errors-data.ts @@ -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;