Merge pull request #7961 from MikeMcQuaid/cleanup-exist

cleanup: check path exists before cleanup.
This commit is contained in:
Mike McQuaid 2020-07-10 10:16:23 +01:00 committed by GitHub
commit bab7c7e190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,6 +302,7 @@ module Homebrew
end end
def cleanup_path(path) def cleanup_path(path)
return unless path.exist?
return unless @cleaned_up_paths.add?(path) return unless @cleaned_up_paths.add?(path)
disk_usage = path.disk_usage disk_usage = path.disk_usage