From 1c44ffdb1b7eaee5276660f2fb99d5724e7c34bf Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Mon, 29 Dec 2025 20:32:42 +0800 Subject: [PATCH] fix bug --- bin/utils/base.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/utils/base.sh b/bin/utils/base.sh index b87f948..9c57cff 100644 --- a/bin/utils/base.sh +++ b/bin/utils/base.sh @@ -119,6 +119,10 @@ url_encode() { echo "$encoded" } - - - +# 检查 Bash 是否已安装 +check_bash_installed() { + if ! command -v bash &> /dev/null; then + echo "错误: Bash 未安装!" + return 1 + fi +}