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

main
Oj 2 years ago
parent 5c0ee418b6
commit 2bc195b479

7
src/bootstrap.js vendored

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

Loading…
Cancel
Save