[Bootstrap] Tweak multi instance handling (remove logging, simplify)
This commit is contained in:
parent
5c0ee418b6
commit
2bc195b479
|
@ -147,12 +147,7 @@ getResources: ${paths.getResources()}
|
||||||
getModuleDataPath: ${paths.getModuleDataPath()}
|
getModuleDataPath: ${paths.getModuleDataPath()}
|
||||||
getInstallPath: ${paths.getInstallPath()}`);
|
getInstallPath: ${paths.getInstallPath()}`);
|
||||||
|
|
||||||
const instanceLock = app.requestSingleInstanceLock();
|
if (!app.requestSingleInstanceLock() && !(process.argv.includes('--multi-instance') || oaConfig.multiInstance === true)) {
|
||||||
const allowMultiInstance = process.argv.includes('--multi-instance') || oaConfig.multiInstance === true; // argv flag or config
|
|
||||||
|
|
||||||
console.log(instanceLock, allowMultiInstance);
|
|
||||||
|
|
||||||
if (!instanceLock && !allowMultiInstance) {
|
|
||||||
log('Bootstrap', 'Non-first instance, quitting (multi-instance disabled)');
|
log('Bootstrap', 'Non-first instance, quitting (multi-instance disabled)');
|
||||||
return app.quit();
|
return app.quit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue