From 4b12eff64294b256e69957d9bbafce05b46f912c Mon Sep 17 00:00:00 2001 From: bohung Date: Fri, 29 Apr 2022 15:45:06 +0800 Subject: [PATCH] Fix bug. --- lib/tasks/exec_command.rake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tasks/exec_command.rake b/lib/tasks/exec_command.rake index ecb039e..efb899c 100644 --- a/lib/tasks/exec_command.rake +++ b/lib/tasks/exec_command.rake @@ -158,7 +158,11 @@ namespace :exec_commands do end def update_infos_for_exec(info,update_last=false,update_array=false) return if @site_construct.nil? - info.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '') + if(update_array) + info.map!{|i| i.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '')} + else + info.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => '') + end if update_last && !@site_construct.infos.empty? @site_construct.infos[-1] += info.to_s else