Skip to content

Commit

Permalink
Ignore version detect error for md5sum on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Nov 1, 2024
1 parent ee098c9 commit 4de4c7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 2 additions & 3 deletions script/get-generic-sys-util/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,9 @@
"md5sha1sum": {
"env": {
"CM_SYS_UTIL_NAME": "md5sha1sum",
"CM_SYS_UTIL_VERSION_CMD": "md5sum --version",
"CM_SYS_UTIL_VERSION_CMD": "md5sum --version | grep sha1sum",
"CM_SYS_UTIL_VERSION_RE": "\\b(\\d+\\.\\d+(?:\\.\\d+)?)\\b",
"CM_TMP_VERSION_DETECT_GROUP_NUMBER": 0,
"CM_SYS_UTIL_VERSION_CMD_IGNORE_ERROR": "yes"
"CM_TMP_VERSION_DETECT_GROUP_NUMBER": 0
},
"new_env_keys": ["CM_MD5SHA1SUM_VERSION"],
"state": {
Expand Down
9 changes: 2 additions & 7 deletions script/get-generic-sys-util/detect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ if [[ -n "${CM_SYS_UTIL_VERSION_CMD}" ]]; then
cmd="${CM_SYS_UTIL_VERSION_CMD} > tmp-ver.out"
fi
echo $cmd
if [[ "${CM_SYS_UTIL_VERSION_CMD_IGNORE_ERROR}" == "yes" ]]; then
eval $cmd
exit 0
else
eval $cmd
test $? -eq 0 || exit $?
fi
eval $cmd
test $? -eq 0 || exit $?
fi

0 comments on commit 4de4c7d

Please sign in to comment.