server: fix python plugins on windows

This commit is contained in:
Koushik Dutta
2022-07-01 13:22:36 -07:00
parent a4b24fabf8
commit a8675479c6
4 changed files with 88 additions and 20 deletions

View File

@@ -45,7 +45,9 @@ export class PythonRuntimeWorker extends ChildProcessWorker {
}
}
this.worker = child_process.spawn('python3', args, {
const pythonPath = os.platform() === 'win32' ? 'py.exe' : 'python3';
this.worker = child_process.spawn(pythonPath, args, {
// stdin, stdout, stderr, peer in, peer out
stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe'],
env: Object.assign({