From 9b82bedc6f589b19c1cf9dc8f566f4c19702d965 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Sat, 4 Jan 2025 12:44:49 -0500 Subject: [PATCH] Only register stats dirs when command available (#33454) --- config/initializers/statistics.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/initializers/statistics.rb b/config/initializers/statistics.rb index a266607445..9b35ac96c4 100644 --- a/config/initializers/statistics.rb +++ b/config/initializers/statistics.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +return unless defined?(Rails::Command::StatsCommand) + [ %w(AppLibs app/lib), %w(Policies app/policies),