Skip to content

Commit

Permalink
💚 Fix prisma schema path evaluation on windows
Browse files Browse the repository at this point in the history
Closes #573
  • Loading branch information
baptisteArno committed Jun 24, 2023
1 parent 63e826f commit dcda2d0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/prisma/scripts/executeCommand.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { exec } from 'child_process'
import { join } from 'path'
import { join, relative } from 'path'

require('dotenv').config({
override: true,
path: join(__dirname, `../.env`),
})

const postgesqlSchemaPath = join(__dirname, '../postgresql/schema.prisma')
const mysqlSchemaPath = join(__dirname, '../mysql/schema.prisma')
const postgesqlSchemaPath = relative(
process.cwd(),
join(__dirname, `../postgresql/schema.prisma`)
)

const mysqlSchemaPath = relative(
process.cwd(),
join(__dirname, `../mysql/schema.prisma`)
)

type Options = {
force?: boolean
Expand Down

0 comments on commit dcda2d0

Please sign in to comment.