From abd0165164de52c1026e20382fbc000641f215ba Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Fri, 6 May 2022 19:19:36 -0400 Subject: [PATCH] Added macOS check to kill --- app/js/aether_native_app_v3.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/js/aether_native_app_v3.js b/app/js/aether_native_app_v3.js index 316e918..c2ad199 100644 --- a/app/js/aether_native_app_v3.js +++ b/app/js/aether_native_app_v3.js @@ -470,7 +470,13 @@ exports.kill_processes = async function ({process_name = null}) { console.log('*** Electron framework export: kill_processes() ***'); console.log(process_name); // process_name or grep pattern - let command = `pkill ${process_name}`; + let command = ''; + if (os.platform == 'darwin') { + command = `osascript -e 'quit app "${process_name}"'`; + } else { + command = `pkill ${process_name}`; + } + child_process.exec(command, (err, stdout, stdin) => { if (err) throw err; console.log(stdout);