Skip to content

fix: correct Windows Chrome executable path extraction regex#834

Open
BingqingLyu wants to merge 1 commit intomainfrom
fork-pr-48130-fix-issue-48043
Open

fix: correct Windows Chrome executable path extraction regex#834
BingqingLyu wants to merge 1 commit intomainfrom
fork-pr-48130-fix-issue-48043

Conversation

@BingqingLyu
Copy link
Copy Markdown
Owner

@BingqingLyu BingqingLyu commented Apr 27, 2026

Summary

Fix Chrome user profile attach functionality on Windows by correcting invalid regex patterns in extractWindowsExecutablePath:

  • Removed extra backslash before .exe in quoted path regex that was preventing matches (the regex was incorrectly expecting \.exe instead of just .exe at the end of the path)
  • Fixed unquoted path regex to properly handle Windows paths with backslashes (replaced invalid [^\\s]+ pattern with \S+ to match all non-whitespace characters including backslashes)
  • Updated regex patterns to match all valid Windows executable paths ending with .exe

Changes

  • Only modified src/browser/chrome.executables.ts: updated the two regex patterns in the extractWindowsExecutablePath function
  • No other functional changes

Testing

Verified fix with test cases for both quoted and unquoted Windows paths, including paths with spaces, special characters, and different executable locations. All test cases now correctly extract the executable path.

Fixes openclaw#48043

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 openclaw#48043
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Chrome User Profile Attach Broken on Windows

1 participant