From 137b7781b69c35ae57a72e0e0362efa994d9979b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Wed, 8 May 2024 21:30:50 +0800 Subject: [PATCH] Fix bug. --- lib/tasks/exec_command.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/exec_command.rake b/lib/tasks/exec_command.rake index aad72f4..b537cb3 100644 --- a/lib/tasks/exec_command.rake +++ b/lib/tasks/exec_command.rake @@ -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")