put app root in $HOME
This commit is contained in:
@@ -256,7 +256,10 @@ private
|
|||||||
1.upto(formation[@names[process]]) do |n|
|
1.upto(formation[@names[process]]) do |n|
|
||||||
reader, writer = create_pipe
|
reader, writer = create_pipe
|
||||||
begin
|
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}"
|
writer.puts "started with pid #{pid}"
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
writer.puts "unknown command: #{process.command}"
|
writer.puts "unknown command: #{process.command}"
|
||||||
|
|||||||
@@ -90,8 +90,10 @@ class Foreman::Process
|
|||||||
!alive?
|
!alive?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
# Returns the working directory for this +Process+
|
||||||
|
#
|
||||||
|
# @returns [String]
|
||||||
|
#
|
||||||
def cwd
|
def cwd
|
||||||
File.expand_path(@options[:cwd] || ".")
|
File.expand_path(@options[:cwd] || ".")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user