mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-04 17:01:33 +02:00
Minor door updates
This commit is contained in:
parent
0e2593bd1c
commit
ecb0cd8941
3 changed files with 23 additions and 9 deletions
24
core/door.js
24
core/door.js
|
@ -71,13 +71,23 @@ module.exports = class Door {
|
|||
|
||||
const args = exeInfo.args.map( arg => stringFormat(arg, formatObj) );
|
||||
|
||||
const door = pty.spawn(exeInfo.cmd, args, {
|
||||
cols : this.client.term.termWidth,
|
||||
rows : this.client.term.termHeight,
|
||||
cwd : cwd,
|
||||
env : exeInfo.env,
|
||||
encoding : null, // we want to handle all encoding ourself
|
||||
});
|
||||
this.client.log.debug(
|
||||
{ cmd : exeInfo.cmd, args, io : this.io },
|
||||
'Executing door'
|
||||
);
|
||||
|
||||
let door;
|
||||
try {
|
||||
door = pty.spawn(exeInfo.cmd, args, {
|
||||
cols : this.client.term.termWidth,
|
||||
rows : this.client.term.termHeight,
|
||||
cwd : cwd,
|
||||
env : exeInfo.env,
|
||||
encoding : null, // we want to handle all encoding ourself
|
||||
});
|
||||
} catch(e) {
|
||||
return cb(e);
|
||||
}
|
||||
|
||||
if('stdio' === this.io) {
|
||||
this.client.log.debug('Using stdio for door I/O');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue