Fix broken fix

Fixes c01eea2b9d
This commit is contained in:
TotallyNotElite 2019-11-24 20:03:08 +01:00
parent c824de1bb1
commit 480f64c2f4

View File

@ -1100,7 +1100,7 @@ function createMeshCore(agent) {
this.prependListener('end', function () { this.httprequest._term.end(function () { console.log('Terminal was closed'); }); });
} else {
if (fs.existsSync("/usr/bin/python") && fs.existsSync("/bin/bash")) {
this.httprequest.process = childProcess.execFile("/usr/bin/python", [ "python", "-c", "import pty; pty.spawn([\"/bin/bash\"])" ], { type: childProcess.SpawnTypes.TERM });
this.httprequest.process = childProcess.execFile("/usr/bin/python", [ "python", "-c", "import pty; pty.spawn([\"/bin/bash\"])" ]);
if (process.platform == 'linux') { this.httprequest.process.stdin.write("export TERM='xterm'\nalias ls='ls --color=auto'\nclear\n"); }
}
else if (fs.existsSync("/bin/bash")) {