mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
Give proper error when seed missing default export (#10635)
This commit is contained in:
parent
ca29764912
commit
17badaf55c
2 changed files with 6 additions and 1 deletions
5
.changeset/tidy-dancers-itch.md
Normal file
5
.changeset/tidy-dancers-itch.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@astrojs/db": patch
|
||||
---
|
||||
|
||||
Give proper error when seed missing default export
|
|
@ -58,7 +58,7 @@ export async function cmd({
|
|||
|
||||
const mod = await importBundledFile({ code, root: astroConfig.root });
|
||||
if (typeof mod.default !== 'function') {
|
||||
console.error(EXEC_DEFAULT_EXPORT_ERROR);
|
||||
console.error(EXEC_DEFAULT_EXPORT_ERROR(filePath));
|
||||
process.exit(1);
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue