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
Ignore inaccessible user config #2158
Conversation
@JelleZijlstra How can I use this in my requirements.txt? I've only usedversions yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, lets just not be silent about it to save peoples time potentially ...
else None | ||
) | ||
except PermissionError: | ||
# We do not have access to the user-level config directory, so ignore it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add some logging (atleast @ debug level) so we at least tell the user why their config is not being picked up.
- Could save hours of debugging for someone one day
- Silent swallowing at debug level is evil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I made it just unconditionally print for now. Maybe we'd want to do it only if -v
is passed, but that's hard because this code gets executed during argument parsing.
@Spacetown for quick testing I'd just manually edit the file ( It's up to @cooperlees but I think we might want to do another release to get this fix out, since the bug seems to make Black completely unusable for use cases like yours. |
I feel this is a super low risk bug fix and releases are easy now. Let's wait till tomorrow morning pacific time and I'll evaluate cutting another release. |
Yes, we can also wait for other issues to come in. |
@JelleZijlstra On my machine it's working. The result is also available here https://github.com/Spacetown/gcovr/runs/2451934895?check_suite_focus=true.
|
Thanks @Spacetown! Looks like a missing newline in the output but I think the first message isn't from Black, so that needs to be fixed elsewhere. |
Fixes #2157