From f278343998a0e3fb4ebc5e3016fdbcfed53d2057 Mon Sep 17 00:00:00 2001 From: xuwei-fit2cloud Date: Wed, 20 Mar 2024 10:49:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=20dectl=20=E6=B8=85?= =?UTF-8?q?=E7=90=86=E6=97=A7=E9=95=9C=E5=83=8F=E6=97=B6=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/dectl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/dectl b/installer/dectl index f17e7df2b2..35944b2d7e 100644 --- a/installer/dectl +++ b/installer/dectl @@ -301,7 +301,7 @@ function clear_images() { component_version=$(echo ${component_image_defined} | awk -F":" '{print $3}' | uniq) component_image=$(echo ${component_image_defined} | awk -F'image: ' '{print $2}' | awk -F':' '{print $1}') - if test -z $(docker images | grep "$component_image" | grep -v " $component_version "); then + if [[ $(docker images | grep "$component_image" | grep -v " $component_version ") == 0 ]]; then echo "$component_image 不存在旧版本镜像" else echo "存在旧版本镜像 : "