Skip to content

Commit 7a12b40

Browse files
committed
[fix] : Fixed build.sh
1 parent 8a4445a commit 7a12b40

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ check_bool() {
353353
prepare_env() {
354354
# Check packages
355355
if [[ "${nodepend}" = false ]]; then
356-
local _check_failed=false _pkg _result=0 _version
356+
local _check_failed=false _pkg _result=0 _version _local _latest
357357
msg_info "Checking dependencies ..."
358358
for _pkg in ${dependence[@]}; do
359359
msg_debug -n "Checking ${_pkg} ..."
@@ -366,8 +366,10 @@ prepare_env() {
366366
echo; msg_warn "Failed to get the latest version of ${_pkg}."
367367
;;
368368
"2")
369+
_local="$(echo "${_version}" | getclm 1)"
370+
_latest="$(echo "${_version}" | getclm 2)"
369371
[[ "${debug}" = true ]] && echo -ne " ${_result[1]}\n"
370-
msg_warn "The version of ${_pkg} installed in local does not match one of the latest.\nLocal: ${_result[1]} Latest: ${_result[2]}"
372+
msg_warn "The version of ${_pkg} installed in local does not match one of the latest.\nLocal: ${_local} Latest: ${_latest}"
371373
;;
372374
"3")
373375
[[ "${debug}" = true ]] && echo

0 commit comments

Comments
 (0)