Skip to content

Commit

Permalink
chore: allow skipping host requirements validation (#5806)
Browse files Browse the repository at this point in the history
  • Loading branch information
olebedev authored Mar 12, 2021
1 parent 7fcb892 commit a185da9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/validateDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import * as os from 'os';
import { spawn } from 'child_process';
import { getUbuntuVersion } from '../utils/ubuntuVersion';
import * as registry from '../utils/registry';
import * as utils from '../utils/utils';
import { printDepsWindowsExecutable } from '../utils/binaryPaths';

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

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

0 comments on commit a185da9

Please sign in to comment.