Skip to content

fix(windows): resolve llama-server with where.exe without shell#1228

Open
stantheman0128 wants to merge 1 commit into
OpenWhispr:mainfrom
stantheman0128:fix/windows-where-exe
Open

fix(windows): resolve llama-server with where.exe without shell#1228
stantheman0128 wants to merge 1 commit into
OpenWhispr:mainfrom
stantheman0128:fix/windows-where-exe

Conversation

@stantheman0128

Copy link
Copy Markdown

Summary

  • On Windows, getSystemBinaryPath used where with shell: true, which routes through cmd.exe and is fragile for PATH lookup.
  • Switch to where.exe with shell: false and windowsHide: true.
  • Split stdout on /\r?\n/ so CRLF from where.exe does not leave a trailing CR on the first path.

AI assistance

This PR was prepared with AI assistance (Cursor/Grok). Human author: Stan Shih (@stantheman0128). Please review carefully.

Verification / Evidence

Live Windows 11 smoke (where.exe + shell: false):

code 0 first "C:\\Program Files\\nodejs\\node.exe" hasCR true

npm run typecheck (pass)
npm run lint (pass)

Avoid cmd.exe shell:true PATH lookup and trim CRLF from where.exe stdout
so system binary detection works reliably on Windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant