Skip to content

fix: resolve Tokio panic and silence logs in SSH askpass mode#147

Merged
Cleboost merged 1 commit into
masterfrom
fix/ssh-askpass-panic
May 11, 2026
Merged

fix: resolve Tokio panic and silence logs in SSH askpass mode#147
Cleboost merged 1 commit into
masterfrom
fix/ssh-askpass-panic

Conversation

@Cleboost
Copy link
Copy Markdown
Owner

This pull request refactors the startup and AskPass handling logic in src/main.rs to improve clarity and reliability. The main changes are focused on how logging is initialized and how the AskPass password retrieval flow is handled asynchronously.

Improvements to logging and initialization:

  • Logging initialization is now skipped when running in AskPass mode (when the RUSTMIUS_ASKPASS_ALIAS environment variable is set), preventing unnecessary log output during password retrieval.
  • The tracing subscriber now explicitly writes logs to stderr for better separation of logs and program output.

AskPass flow improvements:

  • The AskPass password retrieval now uses async/await directly instead of blocking on the runtime, making the code simpler and more idiomatic.
  • Password output to stdout is now performed using write_all and flush to ensure the password is reliably sent to the caller (such as SSH).
  • Redundant debug and error logging during AskPass handling has been removed to avoid interfering with the expected output.

fix #146

@Cleboost Cleboost merged commit 3691240 into master May 11, 2026
1 check passed
@Cleboost Cleboost deleted the fix/ssh-askpass-panic branch May 11, 2026 20:10
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.

Error while attempting to connect to the server

1 participant