print -u2 -PR <%= clear_line %>"%F{yellow}<%= warn %>%B${MODULE}:%b Module was not installed using git. Will not try to update. You can disable this with the zmodule option -z|--frozen.%f"
fi
return 0
fi
if [[ ${URL} != $(command git -C ${DIR} --git-dir=${GIT_DIR} config --get remote.origin.url) ]]; then
if [[ ${URL} != $(command git -C ${DIR} config --get remote.origin.url) ]]; then
print_error "URL does not match. Expected ${URL}. Will not try to update."
return 1
fi
if ! ERR=$(command git -C ${DIR} --git-dir=${GIT_DIR} fetch -pq origin 2>&1); then
if ! ERR=$(command git -C ${DIR} fetch -pq origin 2>&1); then
print_error 'Error during git fetch' ${ERR}
return 1
fi
if [[ ${TYPE} == tag ]]; then
if [[ ${REV} == $(command git -C ${DIR} --git-dir=${GIT_DIR} describe --tags --exact-match 2>/dev/null) ]]; then
if [[ ${REV} == $(command git -C ${DIR} describe --tags --exact-match 2>/dev/null) ]]; then
print_okay 'Already up to date'
return 0
fi
elif [[ -z ${REV} ]]; then
# Get HEAD remote branch
if ! ERR=$(command git -C ${DIR} --git-dir=${GIT_DIR} remote set-head origin -a 2>&1); then
if ! ERR=$(command git -C ${DIR} remote set-head origin -a 2>&1); then
print_error 'Error during git remote set-head' ${ERR}
print -R 'zimfw version: '${_zversion}' (built at 2021-11-11 03:49:14 UTC, previous commit is 6e7c6a2)'
print -R 'zimfw version: '${_zversion}' (built at 2021-11-11 18:43:25 UTC, previous commit is cd71c8d)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)
@ -647,46 +647,45 @@ case \${ACTION} in
fi
;;
update)
readonlyGIT_DIR=\${DIR}/.git
if[[ ! -d \${GIT_DIR}]];then
if[[ ! -r \${DIR}/.git ]];then
if(( PRINTLEVEL > 0));then
print -u2 -PR $'\E[2K\r'\"%F{yellow}! %B\${MODULE}:%b Module was not installed using git. Will not try to update. You can disable this with the zmodule option -z|--frozen.%f\"