Skip to content

Commit

Permalink
set exit code properly from main side
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Nov 25, 2015
1 parent 259decb commit 07614ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/electron-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,19 @@ 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 {
console.error('Startup error: ' + arg.toString());
}
}

process.exit();
process.exit(exitCode);
}

function main(ipcServer: Server, userEnv: env.IProcessEnvironment): void {
Expand Down

0 comments on commit 07614ff

Please sign in to comment.