Skip to content

fix(auth): suppress browser output during login #25#98

Open
huda-code wants to merge 1 commit into
fosrl:mainfrom
huda-code:fix/suppress-browser-stderr
Open

fix(auth): suppress browser output during login #25#98
huda-code wants to merge 1 commit into
fosrl:mainfrom
huda-code:fix/suppress-browser-stderr

Conversation

@huda-code

Copy link
Copy Markdown

Description

Suppresses stdout/stderr from the browser launcher during the auth login browser-open step.

The reported issue shows Chromium/Wayland-specific warnings being printed to the terminal even though the login succeeds. Since pkg/browser forwards the launched browser process's stdout and stderr to the CLI, this change temporarily redirects those streams to io.Discard while opening the browser, preventing browser-specific output from appearing in the login flow.

Related to #25.

How to test?

  • Built the project successfully using go build -o cli .
  • Verified that the browser still opens normally during the login flow.
  • Verified that xdg-open launches the default browser successfully.
  • Tested in a Wayland environment (WAYLAND_DISPLAY=wayland-0).
  • I was not able to reproduce the original Chromium/Wayland warnings locally because my default browser is Firefox rather than Chromium-based. I'd appreciate confirmation from someone who can reproduce the original environment.

@huda-code

Copy link
Copy Markdown
Author

I wasn't able to reproduce the original Chromium/Wayland warnings because my Linux environment uses Firefox as the default browser. This implementation is based on the observation that pkg/browser forwards the browser launcher's stdout/stderr to the CLI, which appeared to be the most likely source of the reported output.

If this doesn't address the issue in the original environment, I'm happy to revise the implementation or investigate an alternative approach.

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.

1 participant