From ea65422796d783bbe764eff7657192874837ecc1 Mon Sep 17 00:00:00 2001 From: Olivier Penhoat Date: Wed, 17 Aug 2022 17:11:00 +0200 Subject: [PATCH] Update opener.js Exit properly --- lib/opener.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/opener.js b/lib/opener.js index 08888c6..f458121 100644 --- a/lib/opener.js +++ b/lib/opener.js @@ -62,5 +62,9 @@ module.exports = function opener(args, options, callback) { args = ["/c", "start", "\"\""].concat(args); } - return childProcess.execFile(command, args, options, callback); + const child = childProcess.execFile(command, args, options, callback); + child.on('exit', () => { + process.exit() + }) + return child };