File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/anaconda/.devcontainer Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,11 @@ compare_semver() {
5555}
5656
5757for (( i= 0 ; i< rows; i++ )) ; do
58-
5958 CURRENT_VERSION=$( pip show " ${packages_array[$i,0]} " | grep ' ^Version:' | awk ' {print $2}' )
59+ if [[ -z " $CURRENT_VERSION " ]]; then
60+ echo " No version for ${packages_array[$i,0]} found in upstream i.e. base image."
61+ CURRENT_VERSION=" 0"
62+ fi
6063 REQUIRED_VERSION=" ${packages_array[$i,1]} "
6164 comparison_result=$( compare_semver " ${REQUIRED_VERSION} " " ${CURRENT_VERSION} " )
6265 # Check if the current version installed is greater or equal to the required version
@@ -71,6 +74,10 @@ for ((i=0; i<rows; i++)); do
7174 uniq | \
7275 tail -n 2 | \
7376 head -n 1)
77+ if [[ -z " $CONDA_VERSION " ]]; then
78+ echo " No version for ${packages_array[$i,0]} found in conda channel."
79+ CONDA_VERSION=" 0"
80+ fi
7481 comparison_result2=$( compare_semver " ${REQUIRED_VERSION} " " ${CONDA_VERSION} " )
7582 if [[ $comparison_result2 == " lesser" ]] || [[ $comparison_result2 == " equal" ]]; then
7683 echo -e " Greater version between required version: v${REQUIRED_VERSION} and conda version: v${CONDA_VERSION} is conda version: v${CONDA_VERSION} \n" ;
You can’t perform that action at this time.
0 commit comments