Test: Add Linux GTK version switch for electron to fix test-node

This commit is contained in:
ayumi-signal 2025-06-18 12:15:30 -07:00 committed by GitHub
commit e69c036c4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

11
test/fix-linux-gtk.js Normal file
View file

@ -0,0 +1,11 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
const { app } = require('electron');
if (process.platform === 'linux') {
// eslint-disable-next-line no-console
console.log('Applying electron switch for Linux GTK version --gtk-version=3');
// https://github.com/electron/electron/issues/46538#issuecomment-2808806722
app.commandLine.appendSwitch('gtk-version', '3');
}