SDA-4267 (Remove config file if the file is empty) (#1944)

* SDA-4267 - Remove config file if the file is empty

Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com>

* SDA-4267 - Remove config file if the file is empty

Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com>

---------

Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com>
This commit is contained in:
Kiran Niranjan 2023-08-28 13:08:32 +05:30 committed by GitHub
parent ca20e6cf4c
commit 2bc7c50a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -626,6 +626,7 @@ export class AppMenu {
(windowHandler.url &&
windowHandler.url.startsWith('https://corporate.symphony.com')) ||
false;
const updateChannel = this.getUpdateChannel();
return {
label: i18n.t('Help')(),
role: 'help',
@ -757,7 +758,7 @@ export class AppMenu {
this.setUpdateChannelForMenuEntry(Target.SDA, Channels.Stable),
visible: isCorp,
type: 'checkbox',
checked: this.getUpdateChannel() === Channels.Stable,
checked: updateChannel === Channels.Stable,
label: i18n.t('Stable')(),
},
{
@ -766,7 +767,7 @@ export class AppMenu {
this.setUpdateChannelForMenuEntry(Target.SDA, Channels.Latest),
visible: isCorp,
type: 'checkbox',
checked: this.getUpdateChannel() === Channels.Latest,
checked: updateChannel === Channels.Latest,
label: i18n.t('Latest')(),
},
{
@ -775,7 +776,7 @@ export class AppMenu {
this.setUpdateChannelForMenuEntry(Target.SDA, Channels.IV),
visible: isCorp && isWindowsOS,
type: 'checkbox',
checked: this.getUpdateChannel() === Channels.IV,
checked: updateChannel === Channels.IV,
label: i18n.t('IV Dogfooding')(),
},
{
@ -784,7 +785,7 @@ export class AppMenu {
this.setUpdateChannelForMenuEntry(Target.SDA, Channels.Beta),
visible: isCorp,
type: 'checkbox',
checked: this.getUpdateChannel() === Channels.Beta,
checked: updateChannel === Channels.Beta,
label: i18n.t('Beta')(),
},
{
@ -793,7 +794,7 @@ export class AppMenu {
this.setUpdateChannelForMenuEntry(Target.SDA, Channels.Daily),
visible: isCorp,
type: 'checkbox',
checked: this.getUpdateChannel() === Channels.Daily,
checked: updateChannel === Channels.Daily,
label: i18n.t('Daily')(),
},
],

View File

@ -602,6 +602,7 @@ class Config {
`config-handler: User configuration is empty and nothing to read`,
userConfig,
);
fs.unlinkSync(this.userConfigPath);
return;
}
this.userConfig = this.parseConfigData(userConfig);