mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
fix(updater): stop update if $ZSH
is not a git repository (#10448)
Fixes #10448
This commit is contained in:
parent
15fd9c84de
commit
2b96b7c54b
1 changed files with 6 additions and 0 deletions
|
@ -133,6 +133,12 @@ function update_ohmyzsh() {
|
|||
return
|
||||
fi
|
||||
|
||||
# Test if Oh My Zsh directory is a git repository
|
||||
if ! (cd "$ZSH" && LANG= git rev-parse &>/dev/null); then
|
||||
echo >&2 "[oh-my-zsh] Can't update: not a git repository."
|
||||
return
|
||||
fi
|
||||
|
||||
# Check if there are updates available before proceeding
|
||||
if ! is_update_available; then
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue