Skip to content

Commit

Permalink
fix(cli): let sync throw in check (#12726)
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-lefebvre authored Dec 13, 2024
1 parent 901c21f commit 7c7398c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/twenty-keys-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a case where failing content entries in `astro check` would not be surfaced
6 changes: 1 addition & 5 deletions packages/astro/src/cli/check/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c7398c

Please sign in to comment.