summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-06-17 13:12:27 -0700
committerelijah <elijah@riseup.net>2014-06-17 14:14:58 -0700
commit240fd8f1efe9e76540787a17a13dcaf345c7933e (patch)
treeb37eafeec5f46d773354d35b173e7ed4ab9cb113
parente0be49a97dc0cfb55a4e2b9502aeb04750a86816 (diff)
Gemfile: fix problem when config is missing environments
-rw-r--r--lib/gemfile_tools.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gemfile_tools.rb b/lib/gemfile_tools.rb
index 2cdc42e..50798cb 100644
--- a/lib/gemfile_tools.rb
+++ b/lib/gemfile_tools.rb
@@ -57,7 +57,9 @@ def local_config
new_config = YAML.load_file(filepath)
['development', 'test','production'].each do |env|
config[env] ||= empty_hash.dup
- config[env].merge!(new_config[env])
+ if new_config[env]
+ config[env].merge!(new_config[env])
+ end
end
end
config