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 4ea5341 commit ee098c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion script/get-generic-sys-util/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
9 changes: 7 additions & 2 deletions script/get-generic-sys-util/detect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ee098c9

Please sign in to comment.