Repository navigation
fix: Windows support for opencode.exe resolution, health check, WRAP_CWD - #1
Merged
Merged
Conversation
bootstrap.rs and config.rs were rewritten on main for the OpenCode 2 API (/api/info health probe, basic auth, spawn credentials, validated WRAP_CWD). Resolved by taking main's versions; the Windows fixes are re-applied on the V2 code in the following commit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Re-applies the intent of the original Windows commit on top of the V2 code: - Resolve the CLI on Windows by probing PATH for opencode.exe, then the npm opencode.cmd / opencode.bat shims. Rust's Command already appends .exe but does not consult PATHEXT, so bare "opencode" misses npm installs. .cmd shims are run through cmd.exe by std; a warning notes that only the shim is killed on shutdown. - Default WRAP_CWD to the system temp directory on Windows (always exists) instead of /tmp, which fails the directory check there. - Fall back to USERPROFILE for the home-directory warning. - Document the Windows default and the npm-shim caveat in the README. The original health-check relaxation (accept any HTTP 200) is dropped: main now probes /api/info and checks the JSON version, and accepting HTML would mark an OpenCode 2 UI response as healthy. Co-authored-by: srnafi <sezarrezanafi@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes opencode-wrap work on Windows. Three fixes:
Tested on Windows 10 with opencode v1.19.0 and opencode-wrap.