Skip to content

Commit c20df40

Browse files
author
Sophie Atkins
committed
pass cwd directly to exec instead of cd
1 parent bd82a1c commit c20df40

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/vscode/src/CodeLensProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function generateClient(_args: string) {
8383
const schemaPath: string | undefined = vscode.workspace.getConfiguration('prisma').get('schemaPath')
8484

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

8888
prismaGenerateOutputChannel.clear()
8989
prismaGenerateOutputChannel.show(true)
@@ -106,5 +106,5 @@ export function generateClient(_args: string) {
106106
}
107107
}
108108

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

0 commit comments

Comments
 (0)