5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 18:46:22 +00:00

poder ver la salida opcionalmente

This commit is contained in:
f 2022-03-14 13:39:54 -03:00
parent d18293bea3
commit ef00ce4d12

View file

@ -48,7 +48,7 @@ class Deploy < ApplicationRecord
# #
# @param [String] # @param [String]
# @return [Boolean] # @return [Boolean]
def run(cmd) def run(cmd, output: false)
r = nil r = nil
lines = [] lines = []
@ -61,6 +61,7 @@ class Deploy < ApplicationRecord
# TODO: Enviar a un websocket para ver el proceso en vivo? # TODO: Enviar a un websocket para ver el proceso en vivo?
o.each do |line| o.each do |line|
lines << line lines << line
puts line if output
end end
end end
end end