[Bootstrap] Tweak multi instance handling (remove logging, simplify)

This commit is contained in:
Ducko 2022-02-03 21:38:00 +00:00
parent 5c0ee418b6
commit 2bc195b479

7
src/bootstrap.js vendored
View file

@ -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();
}