Check whether the prisma client has already been generated.
( pythonPath: string, env: NodeJS.ProcessEnv )
| 127 | |
| 128 | /** Check whether the prisma client has already been generated. */ |
| 129 | async function isClientGenerated( |
| 130 | pythonPath: string, |
| 131 | env: NodeJS.ProcessEnv |
| 132 | ): Promise<boolean> { |
| 133 | try { |
| 134 | await execa(pythonPath, ['-c', 'import prisma.client'], { |
| 135 | env, |
| 136 | stdio: 'pipe', |
| 137 | }); |
| 138 | return true; |
| 139 | } catch { |
| 140 | return false; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | export const prismaQuirk: Quirk = { |
| 145 | dependency: 'prisma', |