0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

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
This commit is contained in:
Carlo Sala 2023-01-03 10:02:03 +01:00
parent 00c37b6991
commit 3fca9c8933
No known key found for this signature in database
GPG key ID: DA6FB450C1A4FE9A

View file

@ -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