From 41050bd935672da9f39061d87c88141704f11c0e Mon Sep 17 00:00:00 2001 From: Northword Date: Thu, 19 Dec 2024 11:47:22 +0800 Subject: [PATCH] fix: skip install libasound if Ubuntu version is not 24.04 ref: https://github.com/northword/zotero-plugin-scaffold/issues/74#issuecomment-2552664590 --- src/utils/headless.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/headless.ts b/src/utils/headless.ts index 88ec8c7..aeda50d 100644 --- a/src/utils/headless.ts +++ b/src/utils/headless.ts @@ -53,6 +53,12 @@ export async function installXvfb() { } export async function installDepsForUbuntu24() { + const version = execSync("cat /etc/os-release | grep '^VERSION_ID='").toString(); + if (!(version.includes("24"))) { + logger.error("Skip to install deps due to version not 24.04."); + return; + } + checkAndInstallDependencies(["libasound2t64", "libdbus-glib-1-2"]); }