From d7f618807e3d1fa0d0f0ea08ec433249a16e143d Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 28 Nov 2023 18:02:27 +0100 Subject: [PATCH] DEV: Don't warn about clearing tmp/cache (#24602) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No reason to print it out every time 😅 (plus, use the ruby method) --- bin/unicorn | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/unicorn b/bin/unicorn index 2d076feff4b..901fa70162a 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -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")