Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"login oidc" CLI command sometimes skips printing auth URL for non-ttys #1874

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

cfryanr
Copy link
Member

@cfryanr cfryanr commented Feb 23, 2024

This PR is an attempt to fix the problem described in #1868 without introducing any new CLI flags.

Release note:

The `pinniped login oidc` command will skip printing the login URL to stderr if the has browser opened
and if stderr is not a tty. This is to avoid having the URL output on stdout confuse console UIs like k9s.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 38.14%. Comparing base (40e548e) to head (5bd73fc).

Files Patch % Lines
pkg/oidcclient/login.go 83.33% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1874   +/-   ##
=======================================
  Coverage   38.13%   38.14%           
=======================================
  Files         346      346           
  Lines       43628    43638   +10     
=======================================
+ Hits        16639    16647    +8     
  Misses      26474    26474           
- Partials      515      517    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@cfryanr cfryanr merged commit 848d83c into main Feb 26, 2024
40 checks passed
@cfryanr cfryanr deleted the cli_checks_if_stderr_is_tty branch February 26, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants