server: fixup python remote debugging, fs chdir locations

This commit is contained in:
Koushik Dutta
2024-08-14 08:42:55 -07:00
parent d14c592d55
commit 561852bc15
4 changed files with 9 additions and 15 deletions

View File

@@ -96,10 +96,8 @@ export class PythonRuntimeWorker extends ChildProcessWorker {
const setup = () => {
const types = require.resolve('@scrypted/types');
const PYTHONPATH = types.substring(0, types.indexOf('types') + 'types'.length);
const fsDir = path.join(options.unzippedPath, 'fs');
fs.mkdirSync(fsDir, { recursive: true });
this.worker = child_process.spawn(pythonPath, args, {
cwd: fsDir,
cwd: options.unzippedPath,
// stdin, stdout, stderr, peer in, peer out
stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe'],
env: Object.assign({