提交 07614ff9 编写于 作者: B Benjamin Pasero

set exit code properly from main side

上级 259decb3
......@@ -67,9 +67,11 @@ process.on('uncaughtException', (err: any) => {
function quit(error?: Error);
function quit(message?: string);
function quit(arg?: any) {
let exitCode = 0;
if (typeof arg === 'string') {
env.log(arg)
} else {
exitCode = 1; // signal error to the outside
if (arg.stack) {
console.error(arg.stack);
} else {
......@@ -77,7 +79,7 @@ function quit(arg?: any) {
}
}
process.exit();
process.exit(exitCode);
}
function main(ipcServer: Server, userEnv: env.IProcessEnvironment): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册