Updated terminal, so script command is only used on linux, as the script command on MacOS and FreeBSD does not support the required featureset.

Bryan Roe committed Dec 23, 2019 at 10:40 UTC 807ee7a020a9135fd202096c8cb82db770e76da7
1 file changed +2 -2
agents/meshcore.js
+2 -2
@@ -1211,9 +1211,9 @@ function createMeshCore(agent) {
1211 var setupcommands = " alias ls='ls --color=auto'\n";
1212 if (shell == sh) setupcommands += "stty erase ^H\n"
1213
1214 - if (script && shell) {
1214 + if (script && shell && process.platform == 'linux') {
1215 this.httprequest.process = childProcess.execFile(script, ['script', '--return', '--quiet', '-c', '"' + shell + '"', '/dev/null'], options); // Start as active user
1216 - if (process.platform == 'linux') { this.httprequest.process.stdin.write(setupcommands); }
1216 + this.httprequest.process.stdin.write(setupcommands);
1217 } else if (python && shell) {
1218 this.httprequest.process = childProcess.execFile(python, ['python', '-c', 'import pty; pty.spawn(["' + shell + '"])'], options); // Start as active user
1219 if (process.platform == 'linux') { this.httprequest.process.stdin.write(setupcommands); }