Private
Public Access
1
0

fix: bun 安装时自动创建 node 符号链接

This commit is contained in:
2025-12-12 11:47:40 +08:00
parent 5703c163f7
commit 54dac51e3a

View File

@@ -152,6 +152,15 @@ install_tool() {
if eval "$install_cmd"; then if eval "$install_cmd"; then
hash -r 2>/dev/null || true 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 安装成功!" success "$tool_name 安装成功!"
return 0 return 0
else else