Support BROWSER env variable when selecting a browser to launch for oauth2
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- go
- Domain
- authentication, cli
Research direction
Start with vendor/github.com/pkg/browser/browser_linux.go and compare its Linux launcher selection with the referenced go-gh browser implementation. Done when the standard BROWSER environment variable can provide the OAuth2 browser launch command while the existing Linux launcher behavior remains available when it is unset.
Written by the indexing model from the issue text.
Description
Description
The current code for launching a browser to do oauth2 login in Linux hardcodes three linux browser launchers.
providers := []string{"xdg-open", "x-www-browser", "www-browser"}
vendor/github.com/pkg/browser/browser_linux.go
It would be nice if that choice could be overridden via the standard BROWSER= env variable. This would allow the end user to provide alternative browser launch commands. This is, for example, what the github browser utility does go-gh/blob/trunk/pkg/browser/browser.go
The use case for this is users running in dev containers. This allows them to have custom scripts that forward the browser request to outside of the dev container so it can be launched from the host browser (since the dev container likely does not contain a gui browser)
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/cli
-
kind/bug status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
kind/feature status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
kind/bug status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
kind/bug status/0-triage
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NVIDIA/gpu-operator#2955 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
kovidgoyal/kitty#10516 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
cisagov/vulnrichment#337 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100