diff options
author | 2024-04-01 14:18:46 -0400 | |
---|---|---|
committer | 2024-04-01 14:18:46 -0400 | |
commit | 17badaf55c79cec460c74f4da58bf188eedef7e3 (patch) | |
tree | bc94c00bfe75e456317264bc180ac17d6a8c3ac7 | |
parent | ca2976491291e55a6901ba522362f171d31ce6a3 (diff) | |
download | astro-17badaf55c79cec460c74f4da58bf188eedef7e3.tar.gz astro-17badaf55c79cec460c74f4da58bf188eedef7e3.tar.zst astro-17badaf55c79cec460c74f4da58bf188eedef7e3.zip |
Give proper error when seed missing default export (#10635)
Diffstat (limited to '')
-rw-r--r-- | .changeset/tidy-dancers-itch.md | 5 | ||||
-rw-r--r-- | packages/db/src/core/cli/commands/execute/index.ts | 2 |
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 { |