mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 13:51:41 +00:00
fix: deprecar Dir#chdir #13619
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
4064d41855
commit
d17db5428a
1 changed files with 11 additions and 13 deletions
|
@ -65,22 +65,20 @@ class Deploy < ApplicationRecord
|
||||||
lines = []
|
lines = []
|
||||||
|
|
||||||
time_start
|
time_start
|
||||||
Dir.chdir(site.path) do
|
Open3.popen2e(env, cmd, unsetenv_others: true, chdir: site.path) do |_, o, t|
|
||||||
Open3.popen2e(env, cmd, unsetenv_others: true) do |_, o, t|
|
# TODO: Enviar a un websocket para ver el proceso en vivo?
|
||||||
# TODO: Enviar a un websocket para ver el proceso en vivo?
|
Thread.new do
|
||||||
Thread.new do
|
o.each do |line|
|
||||||
o.each do |line|
|
lines << line
|
||||||
lines << line
|
|
||||||
|
|
||||||
puts line if output
|
puts line if output
|
||||||
end
|
|
||||||
rescue IOError => e
|
|
||||||
lines << e.message
|
|
||||||
puts e.message if output
|
|
||||||
end
|
end
|
||||||
|
rescue IOError => e
|
||||||
r = t.value
|
lines << e.message
|
||||||
|
puts e.message if output
|
||||||
end
|
end
|
||||||
|
|
||||||
|
r = t.value
|
||||||
end
|
end
|
||||||
time_stop
|
time_stop
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue