Skip to content

Commit

Permalink
Give proper error when seed missing default export
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Apr 1, 2024
1 parent ca29764 commit 6b6cb50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tidy-dancers-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/db": patch
---

Give proper error when seed missing default export
2 changes: 1 addition & 1 deletion packages/db/src/core/cli/commands/execute/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6b6cb50

Please sign in to comment.