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:
parent
901c21f4f0
commit
7c7398c046
2 changed files with 6 additions and 5 deletions
5
.changeset/twenty-keys-divide.md
Normal file
5
.changeset/twenty-keys-divide.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes a case where failing content entries in `astro check` would not be surfaced
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue