DEV: Add a way to exclude ENV vars from getting unset in `themes:isolated_test` (#13494)
This commit is contained in:
parent
a22aa7562a
commit
fa62b5e83b
|
@ -129,6 +129,7 @@ task "themes:isolated_test" => :environment do |t, args|
|
||||||
if ENV["UNSET_DISCOURSE_ENV_VARS"] == "1"
|
if ENV["UNSET_DISCOURSE_ENV_VARS"] == "1"
|
||||||
ENV.keys.each do |key|
|
ENV.keys.each do |key|
|
||||||
next if !key.start_with?('DISCOURSE_')
|
next if !key.start_with?('DISCOURSE_')
|
||||||
|
next if ENV["DONT_UNSET_#{key}"] == "1"
|
||||||
ENV[key] = nil
|
ENV[key] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue