mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 09:18:08 +00:00
更新安装脚本,修改 ASTER_API_SECRET 输入方式为可见输入,并确保 Bun 启动时具有 TTY 支持,以改善用户交互体验。
This commit is contained in:
@@ -109,8 +109,7 @@ prompt_env() {
|
|||||||
echo "ASTER_API_KEY cannot be empty. Please try again."
|
echo "ASTER_API_KEY cannot be empty. Please try again."
|
||||||
done
|
done
|
||||||
while true; do
|
while true; do
|
||||||
read -r -s -p "ASTER_API_SECRET (input hidden): " ASTER_API_SECRET < /dev/tty
|
read -r -p "ASTER_API_SECRET: " ASTER_API_SECRET < /dev/tty
|
||||||
echo
|
|
||||||
[ -n "${ASTER_API_SECRET:-}" ] && break
|
[ -n "${ASTER_API_SECRET:-}" ] && break
|
||||||
echo "ASTER_API_SECRET cannot be empty. Please try again."
|
echo "ASTER_API_SECRET cannot be empty. Please try again."
|
||||||
done
|
done
|
||||||
@@ -152,7 +151,8 @@ EOF
|
|||||||
|
|
||||||
start_bot() {
|
start_bot() {
|
||||||
# Bun auto-loads .env; no need to run dotenv explicitly
|
# 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 "$@"
|
main "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user