-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
When failing inside of the Typescript portion of the wasp db seed command execution, we return a exit code of 0 instead of 1.
How I initially found out about it:
By calling wasp db seed with a valid seed name e.g. devSeedSimple
// main.wasp
db: {
seeds: [
import { devSeedSimple } from "@src/features/db/seeds",
import { prodSeed } from "@src/features/db/seeds"
],
prismaSetupFn: import { setUpPrisma } from "@src/features/db/prisma",
},But not actually exporting the declared function, we error out on wasp db seed but return exit code 0:
Easy reproduction
Same can be done by throwing any Error inside of the seed function:
export const devSeedSimple: DbSeedFn = async (prismaClient) => {
throw Error("AAAA");
}Extra context I checked for now
Calling the seed directly from package.json script (npm run db-seed) inside of .wasp/out/server returns 1 properly: