diff --git a/lib/potassium/recipes/background_processor.rb b/lib/potassium/recipes/background_processor.rb index a13cacf9..f0152036 100644 --- a/lib/potassium/recipes/background_processor.rb +++ b/lib/potassium/recipes/background_processor.rb @@ -44,7 +44,10 @@ def add_sidekiq end def edit_procfile(cmd) - gsub_file("Procfile", /^.*$/m) { |match| "#{match}worker: #{cmd}" } if selected?(:heroku) + heroku = load_recipe(:heroku) + if selected?(:heroku) || heroku.installed? + gsub_file('Procfile', /^.*$/m) { |match| "#{match}worker: #{cmd}" } + end end def add_adapters(name)