Changes to API for node-pty
This commit is contained in:
@@ -208,13 +208,13 @@ module.exports = class ArchiveUtil {
|
||||
// pty.js doesn't currently give us a error when things fail,
|
||||
// so we have this horrible, horrible hack:
|
||||
let err;
|
||||
proc.once('data', d => {
|
||||
proc.onData(d => {
|
||||
if (_.isString(d) && d.startsWith('execvp(3) failed.')) {
|
||||
err = Errors.ExternalProcess(`${action} failed: ${d.trim()}`);
|
||||
}
|
||||
});
|
||||
|
||||
proc.once('exit', exitCode => {
|
||||
proc.onExit(exitCode => {
|
||||
return cb(
|
||||
exitCode
|
||||
? Errors.ExternalProcess(
|
||||
|
||||
Reference in New Issue
Block a user