[zsh] temporarily fix zplg errors caused by detached HEAD in plugins

This commit is contained in:
Dmytro Meleshko 2020-01-12 10:34:16 +02:00
parent e415f2c1bf
commit 328a75d157
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,8 @@ DOTFILES_PATH="${0:a:h}"
cd "$DOTFILES_PATH" || exit 1
ZSH_DOTFILES="$DOTFILES_PATH/zsh"
source "$ZSH_DOTFILES/functions.zsh"
git pull --rebase --stat origin master
git submodule update --init --recursive --remote --progress

View File

@ -151,7 +151,7 @@ _zplg_load() {
_zplg_source_git_upgrade() {
local plugin_url="$1" plugin_dir="$2"
( cd "$plugin_dir" && git pull && git submodule update --init --recursive )
( cd "$plugin_dir" && (git pull || git fetch) && git submodule update --init --recursive )
}
# small helper for the git source