From 986aaa515bad43118d57315fe3f7e1009adc1e4c Mon Sep 17 00:00:00 2001 From: mciparelli Date: Fri, 25 Oct 2024 11:10:39 -0300 Subject: [PATCH] zorin support --- packages/playwright-core/src/utils/hostPlatform.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/playwright-core/src/utils/hostPlatform.ts b/packages/playwright-core/src/utils/hostPlatform.ts index 8c20d65cce..de349c6240 100644 --- a/packages/playwright-core/src/utils/hostPlatform.ts +++ b/packages/playwright-core/src/utils/hostPlatform.ts @@ -86,6 +86,13 @@ function calculatePlatform(): { hostPlatform: HostPlatform, isOfficiallySupporte return { hostPlatform: ('ubuntu22.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: false }; return { hostPlatform: ('ubuntu24.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: false }; } + // Zorin is ubuntu-based but does not have the same versions + if (distroInfo?.id === 'zorin') { + const zorinMajor = parseInt(distroInfo.version, 10); + if (zorinMajor < 17) + return { hostPlatform: ('ubuntu20.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: false }; + return { hostPlatform: ('ubuntu22.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: false }; + } if (distroInfo?.id === 'debian' || distroInfo?.id === 'raspbian' || distroInfo?.id === 'devuan') { const isOfficiallySupportedPlatform = distroInfo?.id === 'debian'; let debianVersion = distroInfo?.version;