Skip to content

Conversation

@jdoss
Copy link
Contributor

@jdoss jdoss commented Feb 11, 2025

This PR adds support for STEP_OPEN_BROWSER env var which if set to STEP_OPEN_BROWSER=false it will skip opening the default browser and just output the authURL to stderr.

@jdoss jdoss requested review from dopey, hslatman and maraino February 11, 2025 22:32
@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label Feb 11, 2025
@jdoss jdoss changed the title Skip opening the default if STEP_OPEN_BROWSER=false Skip opening the default browser if STEP_OPEN_BROWSER=false Feb 11, 2025
Comment on lines 787 to 790
if skipBrowser := os.Getenv("STEP_OPEN_BROWSER") == "0"; skipBrowser {
fmt.Fprintln(os.Stderr, authURL)
fmt.Fprintln(os.Stderr)
} else {
fmt.Fprintln(os.Stderr, "Your default web browser has been opened to visit:")
fmt.Fprintln(os.Stderr)
fmt.Fprintln(os.Stderr, authURL)
fmt.Fprintln(os.Stderr)
} else {
if err := exec.OpenInBrowser(authURL, o.browser); err != nil {
Copy link
Member

@hslatman hslatman Feb 14, 2025

Choose a reason for hiding this comment

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

Looks like the file needs to be formatted.

The version of the linter to use in CI was updated recently. It needs a rerun with fresh commit to go green.

@hslatman hslatman added this to the v0.28.4 milestone Feb 25, 2025
@hslatman hslatman requested review from a team and azazeal February 25, 2025 09:43
@hslatman hslatman enabled auto-merge February 25, 2025 15:17
@hslatman
Copy link
Member

@jdoss I've rebased your changes.

@hslatman hslatman merged commit 786aae6 into master Feb 25, 2025
13 of 15 checks passed
@hslatman hslatman deleted the jdoss/skip_browser branch February 25, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Waiting for discussion / prioritization by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants