mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +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."
|
||||
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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user