From 06d856e23d6bbc8450f9e0f0b0953b5a25555ee6 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sat, 11 Mar 2023 21:21:46 -0500 Subject: [PATCH] Add an exit delay and key - key 'EXIT_ON_ERROR_DELAY' --- utilities/debugBuilder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/debugBuilder.js b/utilities/debugBuilder.js index 65be4d9..05cd948 100644 --- a/utilities/debugBuilder.js +++ b/utilities/debugBuilder.js @@ -18,7 +18,7 @@ exports.DebugBuilder = class DebugBuilder { this.ERROR = (...messageParts) => { const error = debug(`${appName}:${fileName}:ERROR`); error(messageParts); - if (process.env.EXIT_ON_ERROR) process.exit(); + if (process.env.EXIT_ON_ERROR) setTimeout(process.exit, process.env.EXIT_ON_ERROR_DELAY ?? 0); } } -} \ No newline at end of file +}