From 56b7a28133c8199bee8c1ec5255519f7cba40b31 Mon Sep 17 00:00:00 2001 From: quackerd Date: Mon, 8 Mar 2021 06:23:12 -0500 Subject: [PATCH] fix date --- libozsh.zsh | 2 ++ 1 file changed, 2 insertions(+) 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