fix: 安装 Bun 前检测 unzip 依赖
This commit is contained in:
12
setup.sh
12
setup.sh
@@ -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 ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user