Private
Public Access
1
0

fix: 安装 Bun 前检测 unzip 依赖

This commit is contained in:
2025-12-12 11:43:48 +08:00
parent 36a96d4551
commit 9a26a03f88

View File

@@ -92,6 +92,18 @@ install_bun() {
warning "未检测到 Node.js 或 Bun" warning "未检测到 Node.js 或 Bun"
info "推荐安装 Bun轻量级 JavaScript 运行时)" info "推荐安装 Bun轻量级 JavaScript 运行时)"
echo "" echo ""
# 检测 unzip 依赖
if ! command_exists unzip; then
error "安装 Bun 需要 unzip请先安装"
echo ""
echo -e " Ubuntu/Debian: ${CYAN}sudo apt-get install unzip${NC}"
echo -e " Alpine: ${CYAN}apk add unzip${NC}"
echo -e " CentOS/RHEL: ${CYAN}sudo yum install unzip${NC}"
echo ""
return 1
fi
echo -e " 安装命令: ${CYAN}curl -fsSL https://bun.sh/install | bash${NC}" echo -e " 安装命令: ${CYAN}curl -fsSL https://bun.sh/install | bash${NC}"
echo "" echo ""