mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
Electron 466: fix setting user data path using command line (#358)
- fix setting customer user config directory - add code comments - allow custom user data path to contain character "="
This commit is contained in:
parent
4092984298
commit
1739a25f22
10
js/main.js
10
js/main.js
@ -228,6 +228,16 @@ function setupThenOpenMainWindow() {
|
||||
isAppAlreadyOpen = true;
|
||||
getUrlAndCreateMainWindow();
|
||||
|
||||
// Allows a developer to set custom user data path from command line when
|
||||
// launching the app. Mostly used for running automation tests with
|
||||
// multiple instances
|
||||
let customDataArg = getCmdLineArg(process.argv, '--userDataPath=', false);
|
||||
let customDataFolder = customDataArg.substring(customDataArg.indexOf('=') + 1);
|
||||
|
||||
if (customDataArg && customDataFolder) {
|
||||
app.setPath('userData', customDataFolder);
|
||||
}
|
||||
|
||||
// Event that fixes the remote desktop issue in Windows
|
||||
// by repositioning the browser window
|
||||
electron.screen.on('display-removed', windowMgr.verifyDisplays);
|
||||
|
Loading…
Reference in New Issue
Block a user