From ee098c9a1968e7d05540a206dbde87f85591df6f Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 1 Nov 2024 12:28:04 +0000 Subject: [PATCH] Ignore version detect error for md5sum on macos --- script/get-generic-sys-util/_cm.json | 2 +- script/get-generic-sys-util/detect.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/script/get-generic-sys-util/_cm.json b/script/get-generic-sys-util/_cm.json index bdf81d8d6e..7fc3361930 100644 --- a/script/get-generic-sys-util/_cm.json +++ b/script/get-generic-sys-util/_cm.json @@ -461,7 +461,7 @@ "CM_SYS_UTIL_VERSION_CMD": "md5sum --version", "CM_SYS_UTIL_VERSION_RE": "\\b(\\d+\\.\\d+(?:\\.\\d+)?)\\b", "CM_TMP_VERSION_DETECT_GROUP_NUMBER": 0, - "CM_SYS_UTIL_VERSION_CMD_USE_ERROR_STREAM": "yes" + "CM_SYS_UTIL_VERSION_CMD_IGNORE_ERROR": "yes" }, "new_env_keys": ["CM_MD5SHA1SUM_VERSION"], "state": { diff --git a/script/get-generic-sys-util/detect.sh b/script/get-generic-sys-util/detect.sh index 4095d0fbdf..c983aca149 100644 --- a/script/get-generic-sys-util/detect.sh +++ b/script/get-generic-sys-util/detect.sh @@ -8,7 +8,12 @@ if [[ -n "${CM_SYS_UTIL_VERSION_CMD}" ]]; then cmd="${CM_SYS_UTIL_VERSION_CMD} > tmp-ver.out" fi echo $cmd - eval $cmd - test $? -eq 0 || exit $? + if [[ "${CM_SYS_UTIL_VERSION_CMD_IGNORE_ERROR}" == "yes" ]]; then + eval $cmd + exit 0 + else + eval $cmd + test $? -eq 0 || exit $? + fi fi