0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

fix(cli): let sync throw in check (#12726)

This commit is contained in:
Florian Lefebvre 2024-12-13 16:37:08 +01:00 committed by GitHub
parent 901c21f4f0
commit 7c7398c046
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fixes a case where failing content entries in `astro check` would not be surfaced

View file

@ -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;