From 54dac51e3ab16f5c5d56c7adef751ee41c3b7018 Mon Sep 17 00:00:00 2001 From: sususu98 Date: Fri, 12 Dec 2025 11:47:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bun=20=E5=AE=89=E8=A3=85=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=9B=E5=BB=BA=20node=20=E7=AC=A6?= =?UTF-8?q?=E5=8F=B7=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.sh b/setup.sh index 14a55ca..48c1b2f 100755 --- a/setup.sh +++ b/setup.sh @@ -152,6 +152,15 @@ install_tool() { if eval "$install_cmd"; then hash -r 2>/dev/null || true + + # 如果使用 bun 安装,创建 node 符号链接(如果不存在) + if [[ "$pm" == "bun" ]] && ! command_exists node; then + if [[ -f "$HOME/.bun/bin/bun" ]]; then + ln -sf "$HOME/.bun/bin/bun" "$HOME/.bun/bin/node" 2>/dev/null || true + info "已创建 node 符号链接 (bun -> node)" + fi + fi + success "$tool_name 安装成功!" return 0 else