File tree Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,25 @@ const DEBIAN_BASED_DEPENDENT_PACKAGES = [
1919 "xdg-utils" ,
2020] ;
2121
22+ const UBUNTU_24_DEPENDENT_PACKAGES = [
23+ "libasound2t64" ,
24+ "libatk-bridge2.0-0t64" ,
25+ "libatk1.0-0t64" ,
26+ "libcairo2" ,
27+ "libcups2t64" ,
28+ "libdbus-1-3" ,
29+ "libexpat1" ,
30+ "libgbm1" ,
31+ "libglib2.0-0t64" ,
32+ "libnss3" ,
33+ "libpango-1.0-0" ,
34+ "libxcomposite1" ,
35+ "libxdamage1" ,
36+ "libxfixes3" ,
37+ "libxkbcommon0" ,
38+ "libxrandr2" ,
39+ ] ;
40+
2241const FEDORA_BASED_DEPENDENT_PACKAGES = [
2342 "alsa-lib" ,
2443 "atk" ,
@@ -64,23 +83,26 @@ const installDependencies = async (
6483 }
6584
6685 const packages = await ( async ( ) => {
67- const osReleaseId = await runtime . getOsReleaseId ( ) ;
68- switch ( osReleaseId ) {
86+ const { ID : id , VERSION_ID : versionId } = await runtime . loadOsRelease ( ) ;
87+ switch ( id ) {
6988 case "rhel" :
7089 case "centos" :
7190 case "ol" :
7291 case "fedora" :
7392 return FEDORA_BASED_DEPENDENT_PACKAGES ;
7493 case "debian" :
75- case "ubuntu" :
7694 case "linuxmint" :
7795 return DEBIAN_BASED_DEPENDENT_PACKAGES ;
96+ case "ubuntu" :
97+ return Number . parseInt ( versionId . split ( "." ) [ 0 ] , 10 ) >= 24
98+ ? UBUNTU_24_DEPENDENT_PACKAGES
99+ : DEBIAN_BASED_DEPENDENT_PACKAGES ;
78100 case "opensuse" :
79101 case "opensuse-leap" :
80102 case "sles" :
81103 return SUSE_BASED_DEPENDENT_PACKAGES ;
82104 }
83- throw new Error ( `Unsupported OS: ${ osReleaseId } ` ) ;
105+ throw new Error ( `Unsupported OS: ${ id } ` ) ;
84106 } ) ( ) ;
85107 const sudo = ! noSudo && process . getuid ?.( ) !== 0 ;
86108
You can’t perform that action at this time.
0 commit comments