From feece0f56900129142f0d289d4d4f197058be41d Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 8 Jan 2024 21:53:18 +0100 Subject: [PATCH] fix(deps): check only .dll/.exe files on Windows (#28901) Fixes https://github.com/microsoft/playwright/issues/28846 --- .../playwright-core/src/server/registry/dependencies.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/playwright-core/src/server/registry/dependencies.ts b/packages/playwright-core/src/server/registry/dependencies.ts index 29822afba1..70458277f9 100644 --- a/packages/playwright-core/src/server/registry/dependencies.ts +++ b/packages/playwright-core/src/server/registry/dependencies.ts @@ -55,7 +55,11 @@ export function readDockerVersionSync(): null | { driverVersion: string, dockerI } } -const checkExecutable = (filePath: string) => fs.promises.access(filePath, fs.constants.X_OK).then(() => true).catch(e => false); +const checkExecutable = (filePath: string) => { + if (process.platform === 'win32') + return filePath.endsWith('.exe'); + return fs.promises.access(filePath, fs.constants.X_OK).then(() => true).catch(() => false); +}; function isSupportedWindowsVersion(): boolean { if (os.platform() !== 'win32' || os.arch() !== 'x64')