Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(deps): check only .dll/.exe files on Windows (#28901)

Max Schmittfeece0f56900
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')