put app root in $HOME

This commit is contained in:
David Dollar
2012-07-24 11:18:05 -04:00
parent 21d53818f2
commit c1b57b59cf
2 changed files with 8 additions and 3 deletions
+4 -1
View File
@@ -256,7 +256,10 @@ private
1.upto(formation[@names[process]]) do |n|
reader, writer = create_pipe
begin
pid = process.run(:output => writer, :env => { "PORT" => port_for(process, n).to_s })
pid = process.run(:output => writer, :env => {
"HOME" => process.cwd,
"PORT" => port_for(process, n).to_s
})
writer.puts "started with pid #{pid}"
rescue Errno::ENOENT
writer.puts "unknown command: #{process.command}"
+4 -2
View File
@@ -90,8 +90,10 @@ class Foreman::Process
!alive?
end
private
# Returns the working directory for this +Process+
#
# @returns [String]
#
def cwd
File.expand_path(@options[:cwd] || ".")
end