Permalink
Browse files

Merge pull request #11 from gorsuch/config_var-fix

not all buildpacks release config_vars
  • Loading branch information...
2 parents 8a1e4fd + faaf82b commit 65f7a34119c23b2d1886b6a05da7b15d4db453f9 @ddollar committed Aug 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/mason/buildpack.rb
@@ -57,7 +57,8 @@ def compile(app, env_file=nil, cache=nil)
def write_env(compile_dir, release, env_file)
env = env_file ? Foreman::Engine.new.load_env(env_file) : {}
- config = release["config_vars"].merge(env)
+ config_vars = release["config_vars"] || {}
+ config = config_vars.merge(env)
File.open(File.join(compile_dir, ".env"), "w") do |f|
f.puts config.map{|k, v| "#{k}=#{v}"}.join("\n")

0 comments on commit 65f7a34

Please sign in to comment.