Skip to content

Fix Windows Release: russh connect_pageant is not a Result - #19

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/fix-windows-ssh-pageant-beed
Aug 20, 2026
Merged

Fix Windows Release: russh connect_pageant is not a Result#19
cursor[bot] merged 1 commit into
mainfrom
cursor/fix-windows-ssh-pageant-beed

Conversation

@pavi2410

Copy link
Copy Markdown
Owner

Summary

Cannot run a real Windows MSVC build in this environment (aws-lc-sys needs windows.h). Reviewed everything since the last successful Release (#11) for Windows compile issues.

Release #14 failed only on Windows:

error[E0599]: no method named `with_context` found for struct `AgentClient<S>`
  --> crates/based-ssh/src/tunnel.rs:195
    AgentClient::connect_pageant().await.with_context(|| { ... })

In russh 0.54.5, connect_pageant() is async fn ... -> Self, not Result. connect_named_pipe is the one that returns Result. That only compiles on Windows, and Linux CI never type-checks it.

Fix: use the Pageant client as Self, and attach with_context to the later auth Result.

CI: add windows-latest cargo check -p desktop so this class of bug fails PRs instead of Release.

Other post-#11 desktop/SSH code looks Windows-safe (paths via dirs/PathBuf, russh known_hosts already has a Windows ssh/known_hosts path). The remaining risk is only uncompiled #[cfg(windows)] code, which the new job covers.

Test plan

  • cargo test -p based-ssh
  • cargo clippy -p based-ssh --all-targets
  • CI rust (windows check) green on this PR
  • Re-run Release after merge
Open in Web Open in Cursor 

russh 0.54's AgentClient::connect_pageant returns Self, not Result, so
with_context on that call failed the Release Windows build. Also add a
windows-latest cargo check so #[cfg(windows)] SSH agent code is typed
instead of only failing on Release.

Co-authored-by: Pavitra Golchha <hello@pavi2410.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
based 8bd8ab4 Commit Preview URL

Branch Preview URL
Aug 20 2026, 03:09 PM

@cursor
cursor Bot merged commit 8bd8ab4 into main Aug 20, 2026
3 checks passed
@pavi2410
pavi2410 deleted the cursor/fix-windows-ssh-pageant-beed branch August 20, 2026 18:06
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.

2 participants