5414: Do not blow up if local config file is empty.
authorTom Clegg <tom@curoverse.com>
Wed, 8 Apr 2015 15:40:21 +0000 (11:40 -0400)
committerTom Clegg <tom@curoverse.com>
Wed, 8 Apr 2015 15:46:31 +0000 (11:46 -0400)
services/api/config/initializers/zz_load_config.rb

index 3399fd9bf59fb9751303830cbb87aee89a502e81..8b454b6a72708f5821a0bdcb300fdd49446eb8c0 100644 (file)
@@ -5,6 +5,8 @@ $application_config = {}
   if File.exists? path
     yaml = ERB.new(IO.read path).result(binding)
     confs = YAML.load(yaml)
+    # Ignore empty YAML file:
+    next if confs == false
     $application_config.merge!(confs['common'] || {})
     $application_config.merge!(confs[::Rails.env.to_s] || {})
   end