-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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: cover uses /tmp but ubuntu 22.04 Firefox now won't access /tmp #68343
Comments
cc @thanm |
Thanks for the report @jlearman . I note that this seems to work for me:
Is this an option for your workflow? |
Thanks. My workaround was to reinstall Firefox without |
OK. It doesn't look as though there are any changes needed to Go here, closing out this issue. |
I disagree. You should fix the tool to actually work on a very popular Linux distribution like Ubuntu. Go shouldn't force many users to waste time investigating and then use some strange workaround in order to use a tool. |
Setting |
It's also raised as a See https://bugs.launchpad.net/snapd/+bug/1972762 for a snapd issue. There are many reports of problems with snap Firefox dating back to 2022, but it doesn't look like they'll be fixed. |
From Go's point of view I have no idea what we can do to avoid this problem. |
One solution would be to not use Another option would be to document the issue (possibly adding it to
|
Go version
go version go1.21.11 linux/amd64
Output of
go env
in your module/workspace:What did you do?
go tool cover -html=c.out
What did you see happen?
The command opens Firefox, and Firefox reports that it can't access the file, because on Ubuntu 22.04, Firefox is now a
snap
package, and thus runs in a sandbox without access to /tmp.What did you expect to see?
I expected to see the coverage report displayed in the browser.
The coverage report HTML file should be put in the user's tmp directory. If it doesn't exist, the user should be prompted to create it. In addition, there should be an environment variable to override the location, and this should be documented for
go tool cover
The text was updated successfully, but these errors were encountered: