Skip to content

Commit 7c7398c

Browse files
fix(cli): let sync throw in check (#12726)
1 parent 901c21f commit 7c7398c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.changeset/twenty-keys-divide.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Fixes a case where failing content entries in `astro check` would not be surfaced

packages/astro/src/cli/check/index.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ export async function check(flags: Flags) {
3131
// NOTE: In the future, `@astrojs/check` can expose a `before lint` hook so that this works during `astro check --watch` too.
3232
// For now, we run this once as usually `astro check --watch` is ran alongside `astro dev` which also calls `astro sync`.
3333
const { default: sync } = await import('../../core/sync/index.js');
34-
try {
35-
await sync(flagsToAstroInlineConfig(flags));
36-
} catch (_) {
37-
return process.exit(1);
38-
}
34+
await sync(flagsToAstroInlineConfig(flags));
3935
}
4036

4137
const { check: checker, parseArgsAsCheckConfig } = checkPackage;

0 commit comments

Comments
 (0)