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 };