From 328a75d15758a9bd495afb99bcbbe54cae1f322c Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sun, 12 Jan 2020 10:34:16 +0200 Subject: [PATCH] [zsh] temporarily fix zplg errors caused by detached HEAD in plugins --- upgrade.zsh | 2 ++ zsh/zplg.zsh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/upgrade.zsh b/upgrade.zsh index 3f4b7be..81b28b3 100755 --- a/upgrade.zsh +++ b/upgrade.zsh @@ -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 diff --git a/zsh/zplg.zsh b/zsh/zplg.zsh index 72efd62..3dbec9c 100644 --- a/zsh/zplg.zsh +++ b/zsh/zplg.zsh @@ -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