FIX: Check env for multisite config path even if config file exists (#14536)

... so that it can be overridden for rake tasks without changing the
config file.
This commit is contained in:
Daniel Waterworth 2021-10-06 13:24:50 -05:00 committed by GitHub
parent bdd2b5bb9c
commit 55dd9309e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,8 @@ module Discourse
config.skip_multisite_middleware = true
config.skip_rails_failover_active_record_middleware = true
config.multisite_config_path = File.absolute_path(GlobalSetting.multisite_config_path, Rails.root)
multisite_config_path = ENV['DISCOURSE_MULTISITE_CONFIG_PATH'] || GlobalSetting.multisite_config_path
config.multisite_config_path = File.absolute_path(multisite_config_path, Rails.root)
# Disable so this is only run manually
# we may want to change this later on