fix(core): update
This commit is contained in:
parent
b655d5e6c2
commit
5d6f5ed282
@ -49,15 +49,16 @@ export class SmartExit {
|
|||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
ora.text('Process wants to exit');
|
ora.text('Process wants to exit');
|
||||||
await this.killAll();
|
await this.killAll();
|
||||||
|
ora.finishSuccess('Exited ok!');
|
||||||
|
} else {
|
||||||
|
ora.finishFail('Exited NOT OK!');
|
||||||
}
|
}
|
||||||
ora.finishSuccess('Exited ok!');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// catch ctrl+c event and exit normally
|
// catch ctrl+c event and exit normally
|
||||||
process.on('SIGINT', async () => {
|
process.on('SIGINT', async () => {
|
||||||
ora.text('Ctrl-C... or SIGINT signal received!');
|
ora.text('Ctrl-C... or SIGINT signal received!');
|
||||||
await this.killAll();
|
await this.killAll();
|
||||||
ora.finishSuccess('Exited ok!');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//catch uncaught exceptions, trace, then exit normally
|
//catch uncaught exceptions, trace, then exit normally
|
||||||
@ -65,7 +66,6 @@ export class SmartExit {
|
|||||||
ora.text('SMARTEXIT: uncaught exception...');
|
ora.text('SMARTEXIT: uncaught exception...');
|
||||||
console.log(err);
|
console.log(err);
|
||||||
await this.killAll();
|
await this.killAll();
|
||||||
ora.finishSuccess('Exited ok!');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user