浏览代码

fix(upgrade): check if git is available and working

macOS seems to break dev tools when updating the system. This should
prevent the previous issues. See #11309

Closes #11420
Carlo Sala 1 年之前
父节点
当前提交
3fca9c8933
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/check_for_upgrade.sh

+ 1 - 1
tools/check_for_upgrade.sh

@@ -24,7 +24,7 @@ zstyle -s ':omz:update' mode update_mode || {
 # - git is unavailable on the system.
 if [[ "$update_mode" = disabled ]] \
    || [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
-   || ! command -v git &>/dev/null; then
+   || ! command git --version 2>&1 >/dev/null; then
   unset update_mode
   return
 fi