We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3baa348 commit a8fd182Copy full SHA for a8fd182
src/index.ts
@@ -200,15 +200,17 @@ function resolveColdBoxPlugin(
200
return;
201
}
202
203
- const clean = () => {
+ const clean = (code: number | null) => {
204
if (fs.existsSync(hotFile)) {
205
fs.rmSync(hotFile);
206
207
+ process.exit(code ?? 0);
208
};
209
- process.on("exit", clean);
210
- process.on("SIGINT", process.exit);
211
- process.on("SIGTERM", process.exit);
+ process.on('exit', (code) => clean(code))
+ // callback value is signal string, exit with 0
212
+ process.on('SIGINT', () => clean(0))
213
+ process.on('SIGTERM', () => clean(0))
214
process.on("SIGHUP", process.exit);
215
216
exitHandlersBound = true;
0 commit comments