This commit is contained in:
BoHung Chiu 2022-01-04 10:23:28 +08:00
parent 9cb62dea77
commit b27409fa3f
1 changed files with 6 additions and 4 deletions

View File

@ -197,10 +197,12 @@ namespace :exec_commands do
if data.include?("\n") || outputs.empty?
output_lines = data_str.split("\n")
first_output = output_lines[0]
if outputs.count != 0
outputs[-1] += first_output
else
outputs << first_output
if first_output
if outputs.count != 0
outputs[-1] += first_output
else
outputs << first_output
end
end
new_arr = output_lines[1..-1]
if data_str[-1] == "\n"