Skip to content
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

When collecting coverage data be sure to open the hitfile with read access. #1214

Merged

Conversation

JamesWTruher
Copy link
Contributor

@JamesWTruher JamesWTruher commented Aug 10, 2021

I'm not sure if this warrants an issue, please let me know and I'll open one.

We're starting to use coverlet in the PowerShell project to gather coverage data, but our usage may be outside the norm. We collect coverage via execution of PowerShell script which may be started via sudo - so the hit file may have been created by an elevated user. In this environment, opening the hitfile with write privilege fails. Also, failure to remove the hitfile should not necessarily be fatal (although I have added a warning if the removal fails).

I should have mentioned that I have tested this change and enables us to collect coverage date for PowerShell.

Also, failure to remove the hitfile is not fatal.
@dnfadmin
Copy link

dnfadmin commented Aug 10, 2021

CLA assistant check
All CLA requirements met.

@MarcoRossignoli
Copy link
Collaborator

Hi @JamesWTruher sorry for the very late answer, is this issue blocking your usage?
Can you open an issue for it and link this one so we can track and try to fix?

Copy link
Collaborator

@MarcoRossignoli MarcoRossignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM it's a tmp file with guid appended. I don't see great issue if files will remain there, there are other good way to free up tmp folders if became big and also maybe is used on CI.

@MarcoRossignoli MarcoRossignoli merged commit 8f91b34 into coverlet-coverage:master Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants