fix(installer): always prompt version choice via /dev/tty for curl pipe support [skip ci]

This commit is contained in:
muava12 2026-02-23 03:06:25 +08:00
parent 8f5758aa37
commit 803679d914

View file

@ -35,17 +35,11 @@ echo " ─────────────────────"
echo "" echo ""
# Ask user which version to install # Ask user which version to install
if [ -t 0 ]; then echo -e "${BOLD}Select version to install:${RESET}"
# Interactive mode (run directly from terminal) echo " 1) Original (sipeed/picoclaw)"
echo -e "${BOLD}Select version to install:${RESET}" echo " 2) Fork (muava12/picoclaw-fork)"
echo " 1) Original (sipeed/picoclaw)" echo ""
echo " 2) Fork (muava12/picoclaw-fork)" read -p "Choose [1-2] (default: 2): " version_choice < /dev/tty
echo ""
read -p "Choose [1-2]: " version_choice < /dev/tty
else
# Non-interactive mode (curl | bash) — default to fork
version_choice="2"
fi
if [[ "$version_choice" == "1" ]]; then if [[ "$version_choice" == "1" ]]; then
URL="https://github.com/sipeed/picoclaw/releases/latest/download/picoclaw_Linux_arm64.tar.gz" URL="https://github.com/sipeed/picoclaw/releases/latest/download/picoclaw_Linux_arm64.tar.gz"