[Bootstrap] Tweak multi instance handling (remove logging, simplify)
This commit is contained in:
parent
5c0ee418b6
commit
2bc195b479
1 changed files with 1 additions and 6 deletions
7
src/bootstrap.js
vendored
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…
Reference in a new issue