From 2bc195b4793a4e4838f732fc717637ab580a7abc Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 3 Feb 2022 21:38:00 +0000 Subject: [PATCH] [Bootstrap] Tweak multi instance handling (remove logging, simplify) --- src/bootstrap.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/bootstrap.js b/src/bootstrap.js index 6bfbbcb..62ae0bc 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -147,12 +147,7 @@ getResources: ${paths.getResources()} getModuleDataPath: ${paths.getModuleDataPath()} getInstallPath: ${paths.getInstallPath()}`); - const instanceLock = app.requestSingleInstanceLock(); - const allowMultiInstance = process.argv.includes('--multi-instance') || oaConfig.multiInstance === true; // argv flag or config - - console.log(instanceLock, allowMultiInstance); - - if (!instanceLock && !allowMultiInstance) { + if (!app.requestSingleInstanceLock() && !(process.argv.includes('--multi-instance') || oaConfig.multiInstance === true)) { log('Bootstrap', 'Non-first instance, quitting (multi-instance disabled)'); return app.quit(); }