Skip to content

Commit a185da9

Browse files
authored
chore: allow skipping host requirements validation (#5806)
1 parent 7fcb892 commit a185da9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/server/validateDependencies.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import * as os from 'os';
2020
import { spawn } from 'child_process';
2121
import { getUbuntuVersion } from '../utils/ubuntuVersion';
2222
import * as registry from '../utils/registry';
23+
import * as utils from '../utils/utils';
2324
import { printDepsWindowsExecutable } from '../utils/binaryPaths';
2425

2526
const accessAsync = util.promisify(fs.access.bind(fs));
@@ -28,6 +29,10 @@ const statAsync = util.promisify(fs.stat.bind(fs));
2829
const readdirAsync = util.promisify(fs.readdir.bind(fs));
2930

3031
export async function validateHostRequirements(registry: registry.Registry, browserName: registry.BrowserName) {
32+
if (utils.getAsBooleanFromENV('PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS')) {
33+
process.stdout.write('Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.\n');
34+
return;
35+
}
3136
const ubuntuVersion = await getUbuntuVersion();
3237
if (browserName === 'firefox' && ubuntuVersion === '16.04')
3338
throw new Error(`Cannot launch firefox on Ubuntu 16.04! Minimum required Ubuntu version for Firefox browser is 18.04`);

0 commit comments

Comments
 (0)