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

Standardize cleanup of temp files #88

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

m0dular
Copy link
Contributor

@m0dular m0dular commented Apr 7, 2021

In the case of an error or if the files were otherwise deleted, the
previous commit would try to delete $tmp twice. This commit adds an
array to hold the temp file names and deletes them on exit, checking the
existence of each one.

Also check if $metrics_tmp is >0 bytes before running xargs. It could
be empty if there are no files to tidy.

In the case of an error or if the files were otherwise deleted, the
previous commit would try to delete $tmp twice.  This commit adds an
array to hold the temp file names and deletes them on exit, checking the
existence of each one.

Also check if $metrics_tmp is >0 bytes before running xargs.  It could
be empty if there are no files to tidy.
@m0dular m0dular requested a review from a team as a code owner April 7, 2021 18:44
Copy link
Member

@Sharpie Sharpie left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@m0dular m0dular merged commit e441e1e into puppetlabs:master Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants