🐛 fix(osx): 优化git检查逻辑,添加安装提示和配置助手

This commit is contained in:
HawkinC Macbook 2025-05-21 14:03:30 +08:00
parent 85a0ac5b3e
commit c29caa2fb6
1 changed files with 5 additions and 2 deletions

View File

@ -9,10 +9,13 @@ BRANCH="dev"
# INIT=""
# 检查是否安装git
command -v git >/dev/null 2>&1 || {
if ! command -v git >/dev/null 2>&1; then
echo "git命令未找到请安装git"
exit 1
}
else
echo "git命令已安装继续执行"
git config --global credential.helper store
fi
# 使用getopts处理参数
while getopts ":hib:" opt; do