From 316e6f94c1594b1f56a9b008aeeccc0ac2016d3d Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 6 Jul 2025 10:12:05 +0900 Subject: [PATCH] fix: Skip checking if the browser is installed on Windows --- src/channel_windows.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/channel_windows.ts b/src/channel_windows.ts index ffb6c9a..19515b6 100644 --- a/src/channel_windows.ts +++ b/src/channel_windows.ts @@ -35,17 +35,11 @@ export class WindowsChannelInstaller implements Installer { throw new Error(`Unexpected version: ${version}`); } - const root = this.browserRootDir(version); - try { - await fs.promises.stat(root); - } catch (e) { - if (isENOENT(e)) { - return undefined; - } - throw e; - } - - return { root, bin: "chrome.exe" }; + // Skip checking if the browser is installed by the official installer. + // The official installer installs to the default location and + // some github-hosted runners have outdated versions. + // It enables us to use the latest version of the browser. + return undefined; } async downloadBrowser(version: string): Promise {