Skip to content

Commit

Permalink
SDA-4496 - Fix dev env issue by setting default values in .plist file
Browse files Browse the repository at this point in the history
  • Loading branch information
KiranNiranjan committed Mar 6, 2024
1 parent 66c8bc1 commit 4690d2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/init.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 4690d2a

Please sign in to comment.