mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
fix: add conditional configuration for GOOSE_BIN_DIR in PATH (#5940)
Signed-off-by: Allen <s96016641@gmail.com>
This commit is contained in:
+16
-9
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user