mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 05:37:20 +03:00
fix(deps): check only .dll/.exe files on Windows (#28901)
Fixes https://github.com/microsoft/playwright/issues/28846
This commit is contained in:
parent
0f3bd9835f
commit
feece0f569
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user