DEV: Cleanup after remote update check (#12887)

Checking for remote should cleanup after itself. Currently each check litters
the /tmp filesystem with checkouts. This patch ensures that update checks
keep the system a bit tidier.
This commit is contained in:
Jeff Wong 2021-04-28 14:07:27 -10:00 committed by GitHub
parent 0127df61c1
commit 0abb272289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,11 @@ class RemoteTheme < ActiveRecord::Base
self.last_error_text = nil
ensure
self.save!
begin
importer.cleanup!
rescue => e
Rails.logger.warn("Failed cleanup remote git #{e}")
end
end
end