Skip to content

Commit

Permalink
pass cwd directly to exec instead of cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Druue committed May 27, 2024
1 parent bd82a1c commit c20df40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vscode/src/CodeLensProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function generateClient(_args: string) {
const schemaPath: string | undefined = vscode.workspace.getConfiguration('prisma').get('schemaPath')

const pathArgFlag = ` --schema=${schemaPath}`
const cmd = `(cd ${rootPath} && ${scriptRunner} prisma generate${schemaPath ? pathArgFlag : ''})`
const cmd = `${scriptRunner} prisma generate${schemaPath ? pathArgFlag : ''}`

prismaGenerateOutputChannel.clear()
prismaGenerateOutputChannel.show(true)
Expand All @@ -106,5 +106,5 @@ export function generateClient(_args: string) {
}
}

cp.exec(cmd, (err, stdout, stderr) => handleExec(err, stdout, stderr))
cp.exec(cmd, { cwd: rootPath }, (err, stdout, stderr) => handleExec(err, stdout, stderr))
}

0 comments on commit c20df40

Please sign in to comment.