mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-27 02:17:51 +00:00
fix(browser): detect Playwright chrome-linux64 cache
This commit is contained in:
@@ -493,10 +493,12 @@ function findPlaywrightChromiumExecutableCandidatesLinux(): Array<BrowserExecuta
|
||||
if (!entry.startsWith("chromium-")) {
|
||||
continue;
|
||||
}
|
||||
candidates.push({
|
||||
kind: "chromium",
|
||||
path: path.join(browserPath, entry, "chrome-linux", "chrome"),
|
||||
});
|
||||
for (const linuxDir of ["chrome-linux64", "chrome-linux"]) {
|
||||
candidates.push({
|
||||
kind: "chromium",
|
||||
path: path.join(browserPath, entry, linuxDir, "chrome"),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return candidates;
|
||||
|
||||
@@ -368,7 +368,7 @@ describe("browser chrome helpers", () => {
|
||||
|
||||
it("finds Playwright-managed Linux Chromium", () => {
|
||||
const browserPath = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-ms-playwright-"));
|
||||
const executablePath = path.join(browserPath, "chromium-1217", "chrome-linux", "chrome");
|
||||
const executablePath = path.join(browserPath, "chromium-1217", "chrome-linux64", "chrome");
|
||||
vi.stubEnv("PLAYWRIGHT_BROWSERS_PATH", browserPath);
|
||||
fs.mkdirSync(path.dirname(executablePath), { recursive: true });
|
||||
const exists = mockExistsSync((pathValue) => pathValue === executablePath);
|
||||
|
||||
Reference in New Issue
Block a user