chore: override host platform with env variable (#33434)
This commit is contained in:
parent
ab22f81922
commit
36a975c30b
|
|
@ -35,6 +35,12 @@ export type HostPlatform = 'win64' |
|
||||||
'<unknown>';
|
'<unknown>';
|
||||||
|
|
||||||
function calculatePlatform(): { hostPlatform: HostPlatform, isOfficiallySupportedPlatform: boolean } {
|
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();
|
const platform = os.platform();
|
||||||
if (platform === 'darwin') {
|
if (platform === 'darwin') {
|
||||||
const ver = os.release().split('.').map((a: string) => parseInt(a, 10));
|
const ver = os.release().split('.').map((a: string) => parseInt(a, 10));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue