-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
PermissionError: [Errno 13] Permission denied: '/dev/stdout' #1804
Comments
A simple way to reproduce:
|
This piqued my curiosity on Mastodon, and after investigating for a little while I have a suggestion: does it seem reasonable that Alternatively, it could try to delete the file first, before creating it, which should be safe in the sense that it's going to overwrite the file anyway. If the initial deletion fails, that's probably a good sign that it shouldn't try to delete the file afterwards either. The only way I can think of that this goes awry is if it's told to use an output file that exists and is writable but cannot be deleted, and then the report generation fails, leaving the file with potentially garbage content. But if that's a concern, it could just check whether the file is If any of this sounds good, I'd be happy to contribute a PR (I've gotten more than enough good use out of coverage.py that it seems only fair to offer a contribution), or someone else is welcome to take these ideas and make their own PR. |
coverage 7.5.4
When running
python -m coverage json -q -o /dev/stdout
I get this errorSo, I guess
coveragepy/coverage/misc.py
Line 139 in fa36ebd
PermissionError
.The text was updated successfully, but these errors were encountered: