fix: always obey POSTAL_CONFIG_ROOT

This commit is contained in:
Adam Cooke
2021-07-26 11:21:26 +00:00
parent e2409a663c
commit 1d22ca0f85
+3 -3
View File
@@ -34,10 +34,10 @@ module Postal
def self.config_root def self.config_root
@config_root ||= begin @config_root ||= begin
if __FILE__ =~ /\A\/opt\/postal/ if ENV['POSTAL_CONFIG_ROOT']
Pathname.new("/opt/postal/config")
elsif ENV['POSTAL_CONFIG_ROOT']
Pathname.new(ENV['POSTAL_CONFIG_ROOT']) Pathname.new(ENV['POSTAL_CONFIG_ROOT'])
elsif __FILE__ =~ /\A\/opt\/postal/
Pathname.new("/opt/postal/config")
else else
Pathname.new(File.expand_path("../../../config", __FILE__)) Pathname.new(File.expand_path("../../../config", __FILE__))
end end