This commit is contained in:
邱博亞 2024-05-08 21:30:50 +08:00
parent 7a275f7ed6
commit 137b7781b6
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ namespace :exec_commands do
else
@remove_last_line = (outputs.count > 0 && data_str[0...rm_idx].exclude?("\n"))
end
data_str.gsub!(/.*\r/, '')
data_str.gsub!(/.*\r(?!\n)/, '')
next if data_str.length == 0
if data_str.include?("\n") || outputs.empty?
output_lines = data_str.split("\n")