From e60d227c8f806d11a2752b13c4b249731cc28179 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 24 Aug 2023 23:16:32 +0200 Subject: [PATCH] DEV: Avoid constant redefinition warnings in specs (#23241) Specs sometimes do `Discourse::Application.load_tasks` which re-loads rake task files, causing constant redefinition. --- lib/tasks/maxminddb.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/maxminddb.rake b/lib/tasks/maxminddb.rake index c83162dbab9..011825d9d8f 100644 --- a/lib/tasks/maxminddb.rake +++ b/lib/tasks/maxminddb.rake @@ -1,6 +1,6 @@ # frozen_string_literal: true -GEOLITE_DBS = %w[GeoLite2-City GeoLite2-ASN] +GEOLITE_DBS ||= %w[GeoLite2-City GeoLite2-ASN] desc "downloads MaxMind's GeoLite2-City databases" task "maxminddb:get" => "environment" do