This is an automated email from the ASF dual-hosted git repository.

xxyu pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 1d42d60206dbce5a8aad38d833752f5b98719b5e
Author: Yinghao Lin <39019287+yhca...@users.noreply.github.com>
AuthorDate: Thu Jun 8 23:45:44 2023 +0800

    KYLIN-5715 Using isolated env with fixed locale for cmd diff
---
 build/bin/upgrade.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/build/bin/upgrade.sh b/build/bin/upgrade.sh
index 7a98a17d5a..f5a384a5a0 100644
--- a/build/bin/upgrade.sh
+++ b/build/bin/upgrade.sh
@@ -17,6 +17,9 @@
 # limitations under the License.
 #
 
+LC_ALL="en_US.UTF-8"
+LANGUAGE="en_US"
+
 function help() {
     echo "Usage: upgrade.sh <OLD_KYLIN_HOME> [--silent]"
     echo
@@ -171,7 +174,7 @@ function upgrade() {
     logging "Copy Customize Directory"
     OLDIFS=$IFS
     IFS=$'\n'
-    for diff_log in $(diff -qr $OLD_KYLIN_HOME $NEW_KYLIN_HOME); do
+    for diff_log in $(env -i - LC_ALL="en_US.UTF-8" diff -qr $OLD_KYLIN_HOME 
$NEW_KYLIN_HOME); do
         if [[ $diff_log =~ (^Only in ${OLD_KYLIN_HOME}: )(.*) ]]; then
             diff_file=${BASH_REMATCH[2]}
             if [[ $diff_file == "meta_backups" || $diff_file == "appid" || 
$diff_file == "work" ]]; then

Reply via email to