更新安装脚本,修改 ASTER_API_SECRET 输入方式为可见输入,并确保 Bun 启动时具有 TTY 支持,以改善用户交互体验。

This commit is contained in:
discountry
2025-09-24 22:50:40 +08:00
parent 37f1166302
commit 0122bcc9ba
+3 -3
View File
@@ -109,8 +109,7 @@ prompt_env() {
echo "ASTER_API_KEY cannot be empty. Please try again."
done
while true; do
read -r -s -p "ASTER_API_SECRET (input hidden): " ASTER_API_SECRET < /dev/tty
echo
read -r -p "ASTER_API_SECRET: " ASTER_API_SECRET < /dev/tty
[ -n "${ASTER_API_SECRET:-}" ] && break
echo "ASTER_API_SECRET cannot be empty. Please try again."
done
@@ -152,7 +151,8 @@ EOF
start_bot() {
# Bun auto-loads .env; no need to run dotenv explicitly
bun run start
# Ensure Bun has a TTY for interactive menu input
exec bun run start < /dev/tty
}
main "$@"