mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-25 10:20:16 -06:00
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:
parent
ca20e6cf4c
commit
2bc7c50a6e
@ -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')(),
|
||||
},
|
||||
],
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user