提交 9d1ae7bb 编写于 作者: B Benjamin Pasero

trace the stack when process.exit is called from an extension

上级 c3094f38
...@@ -56,7 +56,10 @@ export interface IInitData { ...@@ -56,7 +56,10 @@ export interface IInitData {
} }
const nativeExit = process.exit; const nativeExit = process.exit;
process.exit = () => { console.warn('An extension called process.exit() and this was prevented'); }; process.exit = () => {
const err = new Error('An extension called process.exit() and this was prevented.');
console.warn((<any>err).stack);
};
export function exit(code?: number) { export function exit(code?: number) {
nativeExit(code); nativeExit(code);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册