fix: 9 bugs from code review

Critical:
- build script now copies launcher menu + china guide (was missing!)
- Windows PATH: handle fresh accounts + warn on 1024 char limit
- Windows .bat: remove old .env keys before adding new (no duplicates)

Important:
- Menu error message: fix range 0-14 → 0-16
- API key input: use read -s to hide plaintext
- macOS install: default to .zshrc (not .bash_profile)
- Website table: fix column mismatch (td → span inside td)
This commit is contained in:
dongsheng123132
2026-03-09 10:51:19 +08:00
parent 34a9688edc
commit 1b4bfb38d9
6 changed files with 64 additions and 22 deletions

View File

@@ -68,9 +68,13 @@ fi
echo -e " ${CYAN}[4/4] 配置环境变量...${NC}"
SHELL_RC="$HOME/.zshrc"
[ ! -f "$SHELL_RC" ] && SHELL_RC="$HOME/.bashrc"
[ ! -f "$SHELL_RC" ] && SHELL_RC="$HOME/.bash_profile"
# macOS Catalina+ 默认 zsh始终写 .zshrc
if [ "$(basename "$SHELL")" = "zsh" ] || [ ! -f "$HOME/.bashrc" -a ! -f "$HOME/.bash_profile" ]; then
SHELL_RC="$HOME/.zshrc"
else
SHELL_RC="$HOME/.bashrc"
fi
touch "$SHELL_RC"
if ! grep -q ".uclaw/node/bin" "$SHELL_RC" 2>/dev/null; then
echo "" >> "$SHELL_RC"