summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Florian Lefebvre <contact@florian-lefebvre.dev> 2024-12-13 16:37:08 +0100
committerGravatar GitHub <noreply@github.com> 2024-12-13 16:37:08 +0100
commit7c7398c04653877da09c7b0f80ee84b02e02aad0 (patch)
tree036e60adb7902bd76b6ce44a36996b7d853b1917
parent901c21f4f09bf61dfbb5ab04db2d7d90120383cb (diff)
downloadastro-7c7398c04653877da09c7b0f80ee84b02e02aad0.tar.gz
astro-7c7398c04653877da09c7b0f80ee84b02e02aad0.tar.zst
astro-7c7398c04653877da09c7b0f80ee84b02e02aad0.zip
fix(cli): let sync throw in check (#12726)
-rw-r--r--.changeset/twenty-keys-divide.md5
-rw-r--r--packages/astro/src/cli/check/index.ts6
2 files changed, 6 insertions, 5 deletions
diff --git a/.changeset/twenty-keys-divide.md b/.changeset/twenty-keys-divide.md
new file mode 100644
index 000000000..9e8405867
--- /dev/null
+++ b/.changeset/twenty-keys-divide.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fixes a case where failing content entries in `astro check` would not be surfaced
diff --git a/packages/astro/src/cli/check/index.ts b/packages/astro/src/cli/check/index.ts
index c93e3b2f4..b7e03aa30 100644
--- a/packages/astro/src/cli/check/index.ts
+++ b/packages/astro/src/cli/check/index.ts
@@ -31,11 +31,7 @@ export async function check(flags: Flags) {
// NOTE: In the future, `@astrojs/check` can expose a `before lint` hook so that this works during `astro check --watch` too.
// For now, we run this once as usually `astro check --watch` is ran alongside `astro dev` which also calls `astro sync`.
const { default: sync } = await import('../../core/sync/index.js');
- try {
- await sync(flagsToAstroInlineConfig(flags));
- } catch (_) {
- return process.exit(1);
- }
+ await sync(flagsToAstroInlineConfig(flags));
}
const { check: checker, parseArgsAsCheckConfig } = checkPackage;