Guard against missing Procfile in engine.rb

Should be able to 'foreman run <task>' without a Procfile.  This seems true to the orig. intent as the cli does not directly check with 'run' (as it  does for 'start').
This commit is contained in:
Brian Kaney
2012-04-24 15:51:14 -04:00
parent f46408e8be
commit 91a87049db

View File

@@ -21,7 +21,7 @@ class Foreman::Engine
Foreman::Color.enable($stdout)
def initialize(procfile, options={})
@procfile = Foreman::Procfile.new(procfile)
@procfile = Foreman::Procfile.new(procfile) if File.exists?(procfile)
@directory = options[:app_root] || File.expand_path(File.dirname(procfile))
@options = options.dup
@output_mutex = Mutex.new