fix: 优化 Bash 安装检查逻辑

This commit is contained in:
Olia Lisa
2025-02-09 15:07:54 +08:00
parent aab132a900
commit 488cb36e66
2 changed files with 7 additions and 16 deletions
+2 -6
View File
@@ -43,12 +43,8 @@ check_jq(){
# 检查 Bash 是否已安装
check_bash_installed() {
if command -v bash &> /dev/null; then
echo "Bash 安装"
return 0 # 返回 0 表示 Bash 已安装
else
echo "Bash 未安装"
if ! command -v bash &> /dev/null; then
echo "错误: Bash 安装"
return 1 # 返回 1 表示 Bash 未安装
fi
}