diff --git a/libozsh.zsh b/libozsh.zsh index 85569f9..4bf697b 100644 --- a/libozsh.zsh +++ b/libozsh.zsh @@ -57,6 +57,8 @@ function ozsh_update { function ozsh_autoupdate { local timediff=$(( ( $(strftime -r %Y-%m-%d $(date +%Y-%m-%d)) - $(strftime -r %Y-%m-%d $(cat $OZSH_LASTUPDATE_FILE)) ) / 86400 )) + echo "last cmd is $?" + if [ ! $? -eq 0 ]; then # recreate the file if the command fails ozsh_write_update_date