Skip to content

Commit

Permalink
fix setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Aug 29, 2024
1 parent f8df7a6 commit 7f7f4f4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions epicshop/setup-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ if (!process.env.SKIP_PLAYGROUND) {
if (!process.env.SKIP_PRISMA) {
console.log(`🏗 generating prisma client in all ${allApps.length} apps...`)
for (const app of allApps) {
const prismaDir = path.join(app.fullPath, 'prisma')
try {
if (await fsExtra.exists(path.join(app.fullPath, 'prisma'))) {
await $({ cwd: app.fullPath, all: true })`prisma generate --sql`
if (await fsExtra.exists(prismaDir)) {
if (await fsExtra.exists(path.join(prismaDir, 'sql'))) {
await $({ cwd: app.fullPath, all: true })`prisma generate --sql`
} else {
await $({ cwd: app.fullPath, all: true })`prisma generate`
}
}
} catch (prismaGenerateResult) {
console.log(prismaGenerateResult.all)
Expand Down

0 comments on commit 7f7f4f4

Please sign in to comment.