Permalink
Browse files

not all buildpacks release config_vars

  • Loading branch information...
1 parent 8a1e4fd commit faaf82b778c26ecb68183ca6521bd00a6a42c6c7 @gorsuch gorsuch committed Aug 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/mason/buildpack.rb
View
3 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 faaf82b

Please sign in to comment.