DEV: Don't warn about clearing tmp/cache (#24602)

No reason to print it out every time 😅 (plus, use the ruby method)
This commit is contained in:
Jarek Radosz 2023-11-28 18:02:27 +01:00 committed by GitHub
parent 8f901cdd38
commit d7f618807e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,10 +29,7 @@ def ensure_cache_clean!
old_hash = File.exist?(hash_file) ? File.read(hash_file) : nil
if old_hash && old_hash != super_sha
puts "WARNING: It looks like your discourse plugins or core version have recently changed."
puts "The tmp/cache directory will be wiped to avoid development issues."
`rm -rf #{RAILS_ROOT}/tmp/cache`
puts
FileUtils.rm_rf("#{RAILS_ROOT}/tmp/cache")
end
FileUtils.mkdir_p(RAILS_ROOT + "/tmp")