SDA-4496 - Fix dev env issue by setting default values in .plist file (#2106)

This commit is contained in:
Kiran Niranjan 2024-03-08 17:02:57 +05:30 committed by GitHub
parent 66c8bc1f0b
commit 542ead3638
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
import { app, crashReporter, Menu } from 'electron';
import { app, crashReporter, Menu, systemPreferences } from 'electron';
import * as path from 'path';
import { isDevEnv } from '../common/env';
@ -30,6 +30,9 @@ Menu.setApplicationMenu(null);
// Set user data path before app ready event
if (isDevEnv) {
const devDataPath = path.join(app.getPath('appData'), 'Symphony-dev');
// dev related config settings should be set here
systemPreferences.setUserDefault('contextIsolation', 'boolean', true);
systemPreferences.setUserDefault('installVariant', 'string', '1234-5678-910');
logger.info(`init: Setting user data path to`, devDataPath);
app.setPath('userData', devDataPath);
}