Skip to content

A platform for community discussion. Free, open, simple.

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

Osama Sayeghfa62b5e83bd8
diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake
index a69b5e07fb8..51746bd268b 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