From 970cfd44ee05f6833733b709ec85e89b8b0009dd Mon Sep 17 00:00:00 2001 From: Kent Dong Date: Sun, 15 Oct 2023 21:59:13 -0500 Subject: [PATCH] fix: No update prompt if the target folder contains an unconfigured Higress instance (#583) --- tools/get-higress.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/get-higress.sh b/tools/get-higress.sh index 5ba477f407..b0c40bd2d5 100644 --- a/tools/get-higress.sh +++ b/tools/get-higress.sh @@ -55,8 +55,8 @@ parseArgs() { validateArgs() { if [ -d "$DESTINATION" ]; then - if [ "$(ls -A "$DESTINATION")" -a "$MODE" != "update" ]; then - echo "The target folder \"$DESTINATION\" is not empty. Add \"-u\" to update an existed Higress instance." && exit 1 + if [ -e "${DESTINATION}/compose/.configured" -a "$MODE" != "update" ]; then + echo "Higress is already installed in the target folder \"$DESTINATION\". Add \"-u\" to update an existed Higress instance." && exit 1 fi if [ ! -w "$DESTINATION" ]; then echo "The target folder \"$DESTINATION\" is not writeable." && exit 1