File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ prepare_env() {
359359 msg_debug -n " Checking ${_pkg} ..."
360360 _version=" $( " ${tools_dir} /package.py" -s " ${_pkg} " ) " || _result=" ${?} "
361361 case " ${_result} " in
362- " 0" )
362+ " 0" | " 1 " )
363363 [[ " ${debug} " = true ]] && echo -ne " ${_version} \n"
364364 ;;
365365 " 1" )
@@ -368,8 +368,7 @@ prepare_env() {
368368 " 2" )
369369 _local=" $( echo " ${_version} " | getclm 1) "
370370 _latest=" $( echo " ${_version} " | getclm 2) "
371- [[ " ${debug} " = true ]] && echo -ne " ${_result[1]} \n"
372- msg_warn " The version of ${_pkg} installed in local does not match one of the latest.\nLocal: ${_local} Latest: ${_latest} "
371+ echo ; msg_warn " The version of ${_pkg} installed in local does not match one of the latest.\nLocal: ${_local} Latest: ${_latest} "
373372 ;;
374373 " 3" )
375374 [[ " ${debug} " = true ]] && echo
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ def compare(package: str) -> tuple[int,Optional[tuple[str]]]:
7272 elif not pkg_from_sync :
7373 msg (f"Failed to get the latest version of { package } ." , "warn" )
7474
75- return (2 , None )
75+ return (1 , ( pkg_from_local . version ) )
7676
7777 if pkg_from_local .version == pkg_from_sync .version :
7878 msg (f"The latest version of { package } is installed." , "info" )
@@ -82,7 +82,7 @@ def compare(package: str) -> tuple[int,Optional[tuple[str]]]:
8282 msg (f"The version of { package } does not match one of the latest." , "warn" )
8383 msg (f"Local: { pkg_from_local .version } Latest: { pkg_from_sync .version } " , "warn" )
8484
85- return (1 , (pkg_from_local .version , pkg_from_sync .version ))
85+ return (2 , (pkg_from_local .version , pkg_from_sync .version ))
8686
8787
8888if __name__ == "__main__" :
@@ -125,6 +125,6 @@ def compare(package: str) -> tuple[int,Optional[tuple[str]]]:
125125 exit_code , info = compare (args .package )
126126
127127 if args .script and info :
128- print (" " . join ( info ) )
128+ print (info )
129129
130130 sys .exit (exit_code )
You can’t perform that action at this time.
0 commit comments