Skip to content

Commit f850628

Browse files
Map removed gnome backend values for safe storage (microsoft#204412)
* Map removed gnome backend values for safe storage candidate fix for microsoft#204318 * chore: fix condition --------- Co-authored-by: deepak1556 <[email protected]>
1 parent b73aade commit f850628

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/main.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,25 +233,24 @@ function configureCommandlineSwitchesSync(cliArgs) {
233233

234234
// Append Electron flags to Electron
235235
if (SUPPORTED_ELECTRON_SWITCHES.indexOf(argvKey) !== -1) {
236-
237-
if (
238-
// Color profile
239-
argvKey === 'force-color-profile' ||
240-
// Password store
241-
argvKey === 'password-store'
242-
) {
243-
if (argvValue) {
244-
app.commandLine.appendSwitch(argvKey, argvValue);
245-
}
246-
}
247-
248-
// Others
249-
else if (argvValue === true || argvValue === 'true') {
236+
if (argvValue === true || argvValue === 'true') {
250237
if (argvKey === 'disable-hardware-acceleration') {
251238
app.disableHardwareAcceleration(); // needs to be called explicitly
252239
} else {
253240
app.commandLine.appendSwitch(argvKey);
254241
}
242+
} else if (argvValue) {
243+
if (argvKey === 'force-color-profile') {
244+
// Color profile
245+
app.commandLine.appendSwitch(argvKey, argvValue);
246+
} else if (argvKey === 'password-store') {
247+
// Password store
248+
let migratedArgvValue = argvValue;
249+
if (argvValue === 'gnome' || argvValue === 'gnome-keyring') {
250+
migratedArgvValue = 'gnome-libsecret';
251+
}
252+
app.commandLine.appendSwitch(argvKey, migratedArgvValue);
253+
}
255254
}
256255
}
257256

0 commit comments

Comments
 (0)