Skip to content

Commit 89b8d1f

Browse files
committed
chore(compass): check for libsecret before setting the flag
1 parent b7967a5 commit 89b8d1f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

packages/compass/src/setup-hadron-distribution.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ if (
3333
process.type === 'browser'
3434
) {
3535
if (process.platform === 'linux') {
36+
const isLibsecretInstalled = () => {
37+
try {
38+
process.dlopen({ exports: {} }, 'libsecret-1.so.0');
39+
return true;
40+
} catch (err: any) {
41+
return err && err.message?.includes('did not self-register');
42+
}
43+
};
44+
3645
// For Linux users with drivers that are avoided by Chromium we disable the
3746
// GPU check to attempt to bypass the disabled WebGL settings.
3847
app.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
@@ -47,7 +56,10 @@ if (
4756
*
4857
* @see {@link https://github.com/microsoft/vscode/issues/185212#issuecomment-1593271415}
4958
*/
50-
if (app.commandLine.hasSwitch('password-store') === false) {
59+
if (
60+
app.commandLine.hasSwitch('password-store') === false &&
61+
isLibsecretInstalled()
62+
) {
5163
app.commandLine.appendSwitch('password-store', 'gnome-libsecret');
5264
}
5365
}

0 commit comments

Comments
 (0)