From 112898c9b60e85bd058cdcc9b0d0650ea1050c8d Mon Sep 17 00:00:00 2001 From: msojocs Date: Sun, 7 Jul 2024 10:20:20 +0800 Subject: [PATCH] fix: prepare --- test/runner/nwjs/module-prepare.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/runner/nwjs/module-prepare.sh b/test/runner/nwjs/module-prepare.sh index d374c32..acc7392 100755 --- a/test/runner/nwjs/module-prepare.sh +++ b/test/runner/nwjs/module-prepare.sh @@ -67,13 +67,11 @@ docker_start(){ for ((i=0; i<5; i++)); do - ret=$(docker_start) - if [ "$ret" -eq 0 ];then - echo "Docker started successfully." + if docker_start; then + printf "Docker started successfully.\n" break - fi - if [ "$i" -eq 4 ];then - echo "Failed to start Docker after 5 attempts." + elif [[ $i -eq 4 ]]; then + printf "Failed to start Docker after 5 attempts.\n" docker ps -a docker logs wine exit 1