From 204d6c0e58e4c0653755097f08d4647aff702e5e Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 18 Mar 2022 18:48:46 +0100 Subject: [PATCH] chore: print error if install-deps is used != ubuntu --- packages/playwright-core/src/utils/dependencies.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/playwright-core/src/utils/dependencies.ts b/packages/playwright-core/src/utils/dependencies.ts index 51e692f84c248..c0c5171ff69c9 100644 --- a/packages/playwright-core/src/utils/dependencies.ts +++ b/packages/playwright-core/src/utils/dependencies.ts @@ -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, } export async function installDependenciesLinux(targets: Set, 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];