Fix xdg-open error spam during login on headless Linux#641
Merged
Conversation
Suppress stdout/stderr from the browser-open command and use .status() instead of .spawn() so failures are properly detected and the fallback message is shown instead of raw xdg-open errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep Stdio::null() redirects to suppress xdg-open error spam, but use non-blocking .spawn() so token polling can start immediately without waiting for the browser command to return. Co-Authored-By: Sasha Varlamov <sasha@sashavarlamov.com>
|
|
|
|
||
| cmd.stdout(std::process::Stdio::null()) | ||
| .stderr(std::process::Stdio::null()) | ||
| .spawn() |
Contributor
There was a problem hiding this comment.
Addressed — reverted to .spawn() (non-blocking, fire-and-forget) while keeping the Stdio::null() redirects to suppress xdg-open error spam. This preserves the original non-blocking behavior so token polling starts immediately.
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.
Summary
git-ai loginsoxdg-openerrors don't spam the terminal on headless Linux environmentslet mut cmdblocks, then applyStdio::null()redirects before spawning.spawn()(non-blocking, fire-and-forget) so the login/token-polling flow is never stalled by a slow or hanging browser commandUpdates since last revision
.status()back to.spawn()to address Devin Review feedback:.status()blocks until the process exits, which can stall the login flow and cause the device authorization code to expire before token polling begins. TheStdio::null()redirects are kept to suppress error output.Review & Testing Checklist for Human
git-ai loginon a headless Linux environment (e.g. Docker/sandbox) and confirm noxdg-openerror output appears in the terminalgit-ai loginon macOS/Linux with a desktop and confirm the browser still opens normally and login completes without delayxdg-opennot installed)Notes
.spawn()itself fails (command not found), not when the browser command exits with an error code. This matches the original pre-PR behavior.Link to Devin session: https://app.devin.ai/sessions/a17b93339b0b4c55b240c81e9bdb4886
Requested by: @svarlamov