-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/cover: Add flag to select browser for go tool cover -html #10365
Comments
Seems to me the place to fix this is in xdg-open. I don't want our tools to have more configuration to support broken operating systems. |
Note that in this case, |
Regardless, I think it's wrong to build os-specific hacks into every tool that wants to talk to a browser (or any other tool) when that is the os's responsibility. I can think of many ways to fix this that do not involve changing the cover tool. |
You can use the flag
|
@dherbst Thanks, this is a good workaround. |
Currently,
go tool cover-html=coverage.out
appears to usexdg-open
on Linux, which doesn't always select the right browser. Even if the$BROWSER
environment variable is set, the cover tool doesn't always select the right browser.Figuring out the right browser to open is tricky, and even
xdg-open
doesn't always get this right. It'd therefore be helpful if the cover tool either accepts a flag to specify the browser, and/or perhaps use the$BROWSER
environment variable if defined.(This is related to #10259 in that the fix is probably the same, but it affects the coverage tool too.)
The text was updated successfully, but these errors were encountered: