diff --git a/packages/playwright-core/src/utils/hostPlatform.ts b/packages/playwright-core/src/utils/hostPlatform.ts index 9664418e3d..7d81f39da3 100644 --- a/packages/playwright-core/src/utils/hostPlatform.ts +++ b/packages/playwright-core/src/utils/hostPlatform.ts @@ -35,6 +35,12 @@ export type HostPlatform = 'win64' | ''; function calculatePlatform(): { hostPlatform: HostPlatform, isOfficiallySupportedPlatform: boolean } { + if (process.env.PLAYWRIGHT_HOST_PLATFORM_OVERRIDE) { + return { + hostPlatform: process.env.PLAYWRIGHT_HOST_PLATFORM_OVERRIDE as HostPlatform, + isOfficiallySupportedPlatform: false + }; + } const platform = os.platform(); if (platform === 'darwin') { const ver = os.release().split('.').map((a: string) => parseInt(a, 10));