Skip to content

Commit 17a7098

Browse files
authored
fix(vscode): include process path env variable in passed path (#4770)
1 parent 977ead3 commit 17a7098

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

vscode/extension/src/utilities/sqlmesh/sqlmesh.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const getTcloudBin = async (): Promise<Result<SqlmeshExecInfo, ErrorType>
8383
...envVariables.value,
8484
PYTHONPATH: interpreterDetails.path[0],
8585
VIRTUAL_ENV: path.dirname(interpreterDetails.binPath!),
86-
PATH: interpreterDetails.binPath!,
86+
PATH: `${interpreterDetails.binPath!}${path.delimiter}${process.env.PATH || ''}`,
8787
},
8888
args: [],
8989
})
@@ -308,7 +308,7 @@ export const sqlmeshExec = async (): Promise<
308308
...envVariables.value,
309309
PYTHONPATH: interpreterDetails.path?.[0],
310310
VIRTUAL_ENV: path.dirname(path.dirname(interpreterDetails.binPath!)), // binPath now points to bin dir
311-
PATH: interpreterDetails.binPath!,
311+
PATH: `${interpreterDetails.binPath!}${path.delimiter}${process.env.PATH || ''}`,
312312
},
313313
args: [],
314314
})
@@ -459,11 +459,11 @@ export const sqlmeshLspExec = async (): Promise<
459459
bin: binPath,
460460
workspacePath,
461461
env: {
462-
PYTHONPATH: interpreterDetails.path?.[0],
463-
VIRTUAL_ENV: path.dirname(path.dirname(interpreterDetails.binPath!)), // binPath now points to bin dir
464-
PATH: interpreterDetails.binPath!, // binPath already points to the bin directory
465462
...process.env,
466463
...envVariables.value,
464+
PYTHONPATH: interpreterDetails.path?.[0],
465+
VIRTUAL_ENV: path.dirname(path.dirname(interpreterDetails.binPath!)), // binPath now points to bin dir
466+
PATH: `${interpreterDetails.binPath!}${path.delimiter}${process.env.PATH || ''}`, // binPath already points to the bin directory
467467
},
468468
args: [],
469469
})

0 commit comments

Comments
 (0)