Skip to content

Commit

Permalink
Map removed gnome backend values for safe storage (#204412)
Browse files Browse the repository at this point in the history
* Map removed gnome backend values for safe storage

candidate fix for #204318

* chore: fix condition

---------

Co-authored-by: deepak1556 <[email protected]>
  • Loading branch information
TylerLeonhardt and deepak1556 authored Feb 6, 2024
1 parent b73aade commit f850628
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,25 +233,24 @@ function configureCommandlineSwitchesSync(cliArgs) {

// Append Electron flags to Electron
if (SUPPORTED_ELECTRON_SWITCHES.indexOf(argvKey) !== -1) {

if (
// Color profile
argvKey === 'force-color-profile' ||
// Password store
argvKey === 'password-store'
) {
if (argvValue) {
app.commandLine.appendSwitch(argvKey, argvValue);
}
}

// Others
else if (argvValue === true || argvValue === 'true') {
if (argvValue === true || argvValue === 'true') {
if (argvKey === 'disable-hardware-acceleration') {
app.disableHardwareAcceleration(); // needs to be called explicitly
} else {
app.commandLine.appendSwitch(argvKey);
}
} else if (argvValue) {
if (argvKey === 'force-color-profile') {
// Color profile
app.commandLine.appendSwitch(argvKey, argvValue);
} else if (argvKey === 'password-store') {
// Password store
let migratedArgvValue = argvValue;
if (argvValue === 'gnome' || argvValue === 'gnome-keyring') {
migratedArgvValue = 'gnome-libsecret';
}
app.commandLine.appendSwitch(argvKey, migratedArgvValue);
}
}
}

Expand Down

0 comments on commit f850628

Please sign in to comment.