diff options
author | 2023-09-26 06:51:57 -0700 | |
---|---|---|
committer | 2023-09-26 21:51:57 +0800 | |
commit | 9fe4b9596988dc8b498825eae266805daf4b435b (patch) | |
tree | 5e5eb043c9e0cdc5ec8f1f9aff220f97cde5b446 | |
parent | 60684fad72a625b1a7aee1ab9a9169574a1c780c (diff) | |
download | astro-9fe4b9596988dc8b498825eae266805daf4b435b.tar.gz astro-9fe4b9596988dc8b498825eae266805daf4b435b.tar.zst astro-9fe4b9596988dc8b498825eae266805daf4b435b.zip |
fix: print image path for NoImageMetadata (#8666)
-rw-r--r-- | .changeset/gentle-rocks-enjoy.md | 5 | ||||
-rw-r--r-- | packages/astro/src/core/errors/errors-data.ts | 2 |
2 files changed, 6 insertions, 1 deletions
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; |