Fix bug where blank lines in Procfile break Foreman.

This commit is contained in:
Matt Haynes
2011-07-28 11:40:31 +01:00
parent a2ba079665
commit 2042de7732
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class Foreman::Engine
@processes ||= begin
@order = []
procfile.split("\n").inject({}) do |hash, line|
next if line.strip == ""
next hash if line.strip == ""
name, command = line.split(/ *: +/, 2)
unless command
warn_deprecated_procfile!
+1
View File
@@ -27,6 +27,7 @@ end
def write_procfile(procfile="Procfile")
File.open(procfile, "w") do |file|
file.puts "alpha: ./alpha"
file.puts "\n"
file.puts "bravo: ./bravo"
end
File.expand_path(procfile)