summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.changeset/tidy-dancers-itch.md5
-rw-r--r--packages/db/src/core/cli/commands/execute/index.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/tidy-dancers-itch.md b/.changeset/tidy-dancers-itch.md
new file mode 100644
index 000000000..56ee8ed63
--- /dev/null
+++ b/.changeset/tidy-dancers-itch.md
@@ -0,0 +1,5 @@
+---
+"@astrojs/db": patch
+---
+
+Give proper error when seed missing default export
diff --git a/packages/db/src/core/cli/commands/execute/index.ts b/packages/db/src/core/cli/commands/execute/index.ts
index eb51467d9..44a2c44fd 100644
--- a/packages/db/src/core/cli/commands/execute/index.ts
+++ b/packages/db/src/core/cli/commands/execute/index.ts
@@ -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 {