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

RSDK-9295 - refactor disable-web-browser name and behavior #4653

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stuqdog
Copy link
Member

@stuqdog stuqdog commented Dec 23, 2024

Adds a slightly less verbose no-browser alias to the disable-web-browser flag, and changes default behavior such that a command won't fail when a browser can't be opened, but rather inform the user that the browser failed to open and that they can still visit the provided URL to log in.

Tested manually.
Without flag, artificially injected error at browser open attempt:
Screenshot 2024-12-23 at 14 08 17

With flag:
Screenshot 2024-12-23 at 14 20 36

@stuqdog stuqdog requested a review from a team as a code owner December 23, 2024 19:09
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Dec 23, 2024
@stuqdog
Copy link
Member Author

stuqdog commented Dec 23, 2024

@thegreatco fyi

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Dec 23, 2024
Comment on lines -663 to +664
func (a *authFlow) loginAsUser(ctx context.Context) (*token, error) {
func (a *authFlow) loginAsUser(c *cli.Context) (*token, error) {
ctx := c.Context
Copy link
Member

Choose a reason for hiding this comment

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

For my own knowledge more than anything, why the change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question! The cli.Context has an io.Writer on it that allows us to write warning messages to terminal when connecting to the browser fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants