fix: bun 安装时自动创建 node 符号链接
This commit is contained in:
9
setup.sh
9
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
|
||||
|
||||
Reference in New Issue
Block a user