Skip to content

Commit f8aeaf3

Browse files
author
openclaw
committed
fix: correct Windows Chrome executable path extraction regex
Fixes broken Chrome user profile attach on Windows by correcting invalid regex patterns in extractWindowsExecutablePath: - Removed extra backslash before .exe in quoted path regex that was preventing matches - Fixed unquoted path regex to properly handle Windows paths with backslashes - Updated regex patterns to match all valid Windows executable paths ending with .exe Fixes #48043
1 parent 1cf544f commit f8aeaf3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/browser/chrome.executables.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,11 @@ function expandWindowsEnvVars(value: string): string {
434434
}
435435

436436
function extractWindowsExecutablePath(command: string): string | null {
437-
const quoted = command.match(/"([^"]+\\.exe)"/i);
437+
const quoted = command.match(/"([^"]+\.exe)"/i);
438438
if (quoted?.[1]) {
439439
return quoted[1];
440440
}
441-
const unquoted = command.match(/([^\\s]+\\.exe)/i);
441+
const unquoted = command.match(/(\S+\.exe)/i);
442442
if (unquoted?.[1]) {
443443
return unquoted[1];
444444
}

0 commit comments

Comments
 (0)