Skip to content

Commit

Permalink
fix: always obey POSTAL_CONFIG_ROOT
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Jul 26, 2021
1 parent e2409a6 commit 1d22ca0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/postal/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ def self.config

def self.config_root
@config_root ||= begin
if __FILE__ =~ /\A\/opt\/postal/
Pathname.new("/opt/postal/config")
elsif ENV['POSTAL_CONFIG_ROOT']
if ENV['POSTAL_CONFIG_ROOT']
Pathname.new(ENV['POSTAL_CONFIG_ROOT'])
elsif __FILE__ =~ /\A\/opt\/postal/
Pathname.new("/opt/postal/config")
else
Pathname.new(File.expand_path("../../../config", __FILE__))
end
Expand Down

0 comments on commit 1d22ca0

Please sign in to comment.