fix: payments add always returns URL, treats browser failure as non-fatal#72
Open
thill2-godaddy wants to merge 1 commit into
Open
fix: payments add always returns URL, treats browser failure as non-fatal#72thill2-godaddy wants to merge 1 commit into
thill2-godaddy wants to merge 1 commit into
Conversation
…atal On WSL2 (and other headless environments) xdg-open exits with code 3 because no desktop environment is configured, causing the command to fail with an error even though the URL was already printed to stderr. Always include the URL in the JSON result and return Ok regardless of whether the browser opened, so the user can click or copy the URL in any environment. Co-Authored-By: Claude Sonnet 4.6 (1M context) <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.
Summary
payments addnow always includes the payment URL in the JSON result, so it's visible (and clickable in modern terminals) regardless of whether the browser openedOkin both casesstd::io::WriteimportBackground
On WSL2 (and other headless Linux environments),
xdg-openexits with code 3 because no desktop environment is configured. The previous code returned anErron browser launch failure, surfacing a confusing error message even though the URL had already been printed to stderr. This made the command unusable on WSL2 without a workaround.Test plan
gddy payments addon WSL2 — should return the URL in the result instead of an errorgddy payments addon macOS/Windows — browser should open and URL should still appear in the result🤖 Generated with Claude Code