From 18a1554a38f034e179ad3ada67ba8ac93262e2fc Mon Sep 17 00:00:00 2001 From: Karsten Hassel Date: Sun, 5 Jan 2025 23:57:58 +0100 Subject: [PATCH] fixes checking display variables --- clientonly/index.js | 4 ++-- tests/electron/helpers/global-setup.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clientonly/index.js b/clientonly/index.js index 4fe4758263..e1ad59c5de 100644 --- a/clientonly/index.js +++ b/clientonly/index.js @@ -85,11 +85,11 @@ .then(function (configReturn) { // check environment for DISPLAY or WAYLAND_DISPLAY const elecParams = ["js/electron.js"]; - if (process.env.WAYLAND_DISPLAY !== "") { + if (process.env.WAYLAND_DISPLAY) { console.log(`Client: Using WAYLAND_DISPLAY=${process.env.WAYLAND_DISPLAY}`); elecParams.push("--enable-features=UseOzonePlatform"); elecParams.push("--ozone-platform=wayland"); - } else if (process.env.DISPLAY !== "") { + } else if (process.env.DISPLAY) { console.log(`Client: Using DISPLAY=${process.env.DISPLAY}`); } else { fail("Error: Requires environment variable WAYLAND_DISPLAY or DISPLAY, none is provided."); diff --git a/tests/electron/helpers/global-setup.js b/tests/electron/helpers/global-setup.js index e61e6c1411..b95ad5217d 100644 --- a/tests/electron/helpers/global-setup.js +++ b/tests/electron/helpers/global-setup.js @@ -14,7 +14,7 @@ exports.startApplication = async (configFilename, systemDate = null, electronPar process.env.mmTestMode = "true"; // check environment for DISPLAY or WAYLAND_DISPLAY - if (process.env.WAYLAND_DISPLAY !== "") { + if (process.env.WAYLAND_DISPLAY) { electronParams.unshift("js/electron.js", "--enable-features=UseOzonePlatform", "--ozone-platform=wayland"); } else { electronParams.unshift("js/electron.js");