chore: print error if install-deps is used != ubuntu (#12877)

This commit is contained in:
Max Schmitt 2022-03-18 19:13:11 +01:00 committed by GitHub
parent bb756c5b23
commit d795f5dd64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,7 @@ import childProcess from 'child_process';
import * as utils from './utils';
import { buildPlaywrightCLICommand } from './registry';
import { deps } from './nativeDeps';
import { getUbuntuVersion } from './ubuntuVersion';
const BIN_DIRECTORY = path.join(__dirname, '..', '..', 'bin');
@ -53,6 +54,8 @@ export async function installDependenciesWindows(targets: Set<DependencyGroup>,
}
export async function installDependenciesLinux(targets: Set<DependencyGroup>, dryRun: boolean) {
if (await getUbuntuVersion() === '')
throw new Error(`Unsupported Linux distribution, only Ubuntu is supported!`);
const libraries: string[] = [];
for (const target of targets) {
const info = deps[utils.hostPlatform];