From d9b447d6839c1a4d84f7c00232ba109c9fce8441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=89=E8=99=8E?= Date: Thu, 18 Dec 2025 02:41:55 +0800 Subject: [PATCH] fix: add conditional configuration for GOOSE_BIN_DIR in PATH (#5940) Signed-off-by: Allen --- download_cli.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/download_cli.sh b/download_cli.sh index 572563de..da15b516 100755 --- a/download_cli.sh +++ b/download_cli.sh @@ -319,16 +319,18 @@ if [[ ":$PATH:" != *":$GOOSE_BIN_DIR:"* ]]; then echo "or rerun this install script after updating your PATH." else SHELL_NAME=$(basename "$SHELL") - + echo "" echo "The \$GOOSE_BIN_DIR is not in your PATH." - echo "What would you like to do?" - echo "1) Add it for me" - echo "2) I'll add it myself, show instructions" - - read -p "Enter choice [1/2]: " choice - - case "$choice" in + + if [ "$CONFIGURE" = true ]; then + echo "What would you like to do?" + echo "1) Add it for me" + echo "2) I'll add it myself, show instructions" + + read -p "Enter choice [1/2]: " choice + + case "$choice" in 1) RC_FILE="$HOME/.${SHELL_NAME}rc" echo "Adding \$GOOSE_BIN_DIR to $RC_FILE..." @@ -344,7 +346,12 @@ if [[ ":$PATH:" != *":$GOOSE_BIN_DIR:"* ]]; then *) echo "Invalid choice. Please add \$GOOSE_BIN_DIR to your PATH manually." ;; - esac + esac + else + echo "" + echo "Configure disabled. Please add \$GOOSE_BIN_DIR to your PATH manually." + fi + fi echo ""