Properly set exit code for process.
Supercedes #246. Includes provisions for buggy behavior of WScript.Quit.
This commit is contained in:
parent
2843b82f08
commit
299f1c3390
|
@ -125,7 +125,11 @@ var sys: System = (function () {
|
|||
return 0;
|
||||
},
|
||||
exit(exitCode?: number): void {
|
||||
WScript.Quit(exitCode);
|
||||
try {
|
||||
WScript.Quit(exitCode);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -227,4 +227,4 @@ module ts {
|
|||
}
|
||||
}
|
||||
|
||||
ts.executeCommandLine(sys.args);
|
||||
sys.exit(ts.executeCommandLine(sys.args));
|
||||
|
|
Loading…
Reference in a new issue