DEV: Add a way to exclude ENV vars from getting unset in `themes:isolated_test` (#13494)

DEV: Add a way to exclude ENV vars from getting unset in themes:isolated_test (#13494)

diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake
index a69b5e0..51746bd 100644
--- a/lib/tasks/themes.rake
+++ b/lib/tasks/themes.rake
@@ -129,6 +129,7 @@ task "themes:isolated_test" => :environment do |t, args|
   if ENV["UNSET_DISCOURSE_ENV_VARS"] == "1"
     ENV.keys.each do |key|
       next if !key.start_with?('DISCOURSE_')
+      next if ENV["DONT_UNSET_#{key}"] == "1"
       ENV[key] = nil
     end
   end

GitHub sha: fa62b5e83bd8aabb560b7d79d241b054ade1c551

This commit appears in #13494 which was approved by CvX. It was merged by OsamaSayegh.