diff --git a/zinit-install.zsh b/zinit-install.zsh index 3e6621908..66aec97af 100644 --- a/zinit-install.zsh +++ b/zinit-install.zsh @@ -2267,18 +2267,23 @@ zimv() { @zinit-substitute from to - local -a afr + local -a afr retval ( () { setopt localoptions noautopushd; builtin cd -q "$dir"; } || return 1 afr=( ${~from}(DN) ) if (( ${#afr} )) { if (( !OPTS[opt_-q,--quiet] )) { command cp -vf "${afr[1]}" "$to" + retval=$? + # ignore errors if no compiled file is found command cp -vf "${afr[1]}".zwc "$to".zwc 2>/dev/null } else { command cp -f "${afr[1]}" "$to" + retval=$? + # ignore errors if no compiled file is found command cp -f "${afr[1]}".zwc "$to".zwc 2>/dev/null } } + return $retval ) } # ]]]