Skip to content

Commit 7f7f4f4

Browse files
committed
fix setup
1 parent f8df7a6 commit 7f7f4f4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

epicshop/setup-custom.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,14 @@ if (!process.env.SKIP_PLAYGROUND) {
5252
if (!process.env.SKIP_PRISMA) {
5353
console.log(`🏗 generating prisma client in all ${allApps.length} apps...`)
5454
for (const app of allApps) {
55+
const prismaDir = path.join(app.fullPath, 'prisma')
5556
try {
56-
if (await fsExtra.exists(path.join(app.fullPath, 'prisma'))) {
57-
await $({ cwd: app.fullPath, all: true })`prisma generate --sql`
57+
if (await fsExtra.exists(prismaDir)) {
58+
if (await fsExtra.exists(path.join(prismaDir, 'sql'))) {
59+
await $({ cwd: app.fullPath, all: true })`prisma generate --sql`
60+
} else {
61+
await $({ cwd: app.fullPath, all: true })`prisma generate`
62+
}
5863
}
5964
} catch (prismaGenerateResult) {
6065
console.log(prismaGenerateResult.all)

0 commit comments

Comments
 (0)