SDA-4275 Persist user config on first time launch and on pod URL update (#1943)

This commit is contained in:
Salah Benmoussati 2023-08-22 09:52:45 +02:00 committed by GitHub
parent 0d37f8e323
commit 9dce2d8a70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -429,6 +429,7 @@ ipcMain.on(
url: arg.newPodUrl,
});
}
config.writeUserConfig();
const urlFromCmd = getCommandLineArgs(process.argv, '--url=', false);
const { url: userConfigURL } = config.getUserConfigFields(['url']);
const { url: globalConfigURL } = config.getGlobalConfigFields(['url']);

View File

@ -83,7 +83,8 @@ const startApplication = async () => {
await config.initializeUserConfig();
await config.readUserConfig();
await config.checkFirstTimeLaunch();
if (config.isFirstTimeLaunch()) {
const isFirstTimeLaunch = config.isFirstTimeLaunch();
if (isFirstTimeLaunch) {
logger.info(
`main: This is a first time launch! will update config and handle auto launch`,
);
@ -91,6 +92,7 @@ const startApplication = async () => {
if (!isLinux) {
await autoLaunchInstance.handleAutoLaunch();
}
config.writeUserConfig();
}
await app.whenReady();
if (oneStart) {