Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up cask audit tmpdir after use
`Cask::Audit#extract_artifacts` is used in the `#audit_signing` and `#cask_plist_min_os` methods to create a directory in `/tmp` and extract cask artifacts without duplicating the work if it's already done. However, due to how this is set up, `tmpdir` isn't removed afterward and the extracted artifacts will take up disk space until the `tmp` directory is cleaned up. As a result, running `brew audit --strict --online` locally can chew through disk space and it may not be clear to the user where their free space has gone. This adds a finalizer method to `Cask::Audit` to remove the created `@tmpdir` (if any) once it's no longer needed. There may be a better way of addressing the issue but this works for now without having to restructure how these audits work.
- Loading branch information