Merge branch 'bugfix/node_v20' of github.com:NuSkooler/enigma-bbs into bugfix/node_v20
This commit is contained in:
commit
b87ff51160
|
@ -208,13 +208,13 @@ module.exports = class ArchiveUtil {
|
||||||
// pty.js doesn't currently give us a error when things fail,
|
// pty.js doesn't currently give us a error when things fail,
|
||||||
// so we have this horrible, horrible hack:
|
// so we have this horrible, horrible hack:
|
||||||
let err;
|
let err;
|
||||||
proc.once('data', d => {
|
proc.onData(d => {
|
||||||
if (_.isString(d) && d.startsWith('execvp(3) failed.')) {
|
if (_.isString(d) && d.startsWith('execvp(3) failed.')) {
|
||||||
err = Errors.ExternalProcess(`${action} failed: ${d.trim()}`);
|
err = Errors.ExternalProcess(`${action} failed: ${d.trim()}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
proc.once('exit', exitCode => {
|
proc.onExit(exitCode => {
|
||||||
return cb(
|
return cb(
|
||||||
exitCode
|
exitCode
|
||||||
? Errors.ExternalProcess(
|
? Errors.ExternalProcess(
|
||||||
|
@ -358,7 +358,7 @@ module.exports = class ArchiveUtil {
|
||||||
output += data;
|
output += data;
|
||||||
});
|
});
|
||||||
|
|
||||||
proc.once('exit', exitCode => {
|
proc.onExit(exitCode => {
|
||||||
if (exitCode) {
|
if (exitCode) {
|
||||||
return cb(
|
return cb(
|
||||||
Errors.ExternalProcess(`List failed with exit code: ${exitCode}`)
|
Errors.ExternalProcess(`List failed with exit code: ${exitCode}`)
|
||||||
|
|
|
@ -113,7 +113,7 @@ module.exports = class Door {
|
||||||
spawnOptions
|
spawnOptions
|
||||||
);
|
);
|
||||||
|
|
||||||
prePty.once('exit', exitCode => {
|
prePty.onExit(exitCode => {
|
||||||
this.client.log.info(
|
this.client.log.info(
|
||||||
{ exitCode: exitCode },
|
{ exitCode: exitCode },
|
||||||
'Door pre-command exited'
|
'Door pre-command exited'
|
||||||
|
@ -165,7 +165,7 @@ module.exports = class Door {
|
||||||
|
|
||||||
this.doorPty.onData(this.doorDataHandler.bind(this));
|
this.doorPty.onData(this.doorDataHandler.bind(this));
|
||||||
|
|
||||||
this.doorPty.once('close', () => {
|
this.doorPty.onExit(exitCode => {
|
||||||
return this.restoreIo(this.doorPty);
|
return this.restoreIo(this.doorPty);
|
||||||
});
|
});
|
||||||
} else if ('socket' === this.io) {
|
} else if ('socket' === this.io) {
|
||||||
|
@ -178,7 +178,7 @@ module.exports = class Door {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.doorPty.once('exit', exitCode => {
|
this.doorPty.onExit(exitCode => {
|
||||||
this.client.log.info({ exitCode: exitCode }, 'Door exited');
|
this.client.log.info({ exitCode: exitCode }, 'Door exited');
|
||||||
|
|
||||||
if (this.sockServer) {
|
if (this.sockServer) {
|
||||||
|
|
|
@ -166,8 +166,8 @@ class ScheduledEvent {
|
||||||
});
|
});
|
||||||
return cb(e);
|
return cb(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
proc.once('exit', exitCode => {
|
proc.onExit(exitCode => {
|
||||||
if (exitCode) {
|
if (exitCode) {
|
||||||
Log.warn(
|
Log.warn(
|
||||||
{ eventName: this.name, action: this.action, exitCode: exitCode },
|
{ eventName: this.name, action: this.action, exitCode: exitCode },
|
||||||
|
|
|
@ -485,11 +485,7 @@ exports.getModule = class TransferFileModule extends MenuModule {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
externalProc.once('close', () => {
|
externalProc.onExit(exitCode => {
|
||||||
return this.restorePipeAfterExternalProc();
|
|
||||||
});
|
|
||||||
|
|
||||||
externalProc.once('exit', exitCode => {
|
|
||||||
this.client.log.debug(
|
this.client.log.debug(
|
||||||
{ cmd: cmd, args: args, exitCode: exitCode },
|
{ cmd: cmd, args: args, exitCode: exitCode },
|
||||||
'Process exited'
|
'Process exited'
|
||||||
|
|
Loading…
Reference in New Issue