fix: use user temp dir for Windows CLI startup#16571
fix: use user temp dir for Windows CLI startup#16571niver2002 wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Reproduced locally on Windows with . Confirmed that forcing to lets the TUI boot normally, so this PR upstreams the same launcher-side fix. |
|
Summary: on Windows, set TMP and TEMP to the user's LOCALAPPDATA Temp directory before spawning the packaged binary from packages/opencode/bin/opencode. This avoids OpenTUI DLL load failures where Bun falls back to invalid temp extraction paths and the CLI hangs at startup with error code 126. Verification: I reproduced the failure locally, confirmed that switching to a user-scoped temp directory lets the TUI boot normally, and upstreamed that same launcher-side fix here. |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Summary
TMPandTEMPto%LOCALAPPDATA%\Tempbefore spawning the Windows binary frompackages/opencode/bin/opencodeB:/~BUN/root/...Verification
Failed to initialize OpenTUI render library ... error code 126