fixed wrong check that resulted in unnecesary access token retrievals

This commit is contained in:
celso 2023-06-16 04:20:03 -03:00
parent 9becdcc826
commit d28fa521a9
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ get_token(){
} }
[ -f "${CFG_DIR}/token.json" ] && [ -f "${CFG_DIR}/expiration.txt" ] && { [ -f "${CFG_DIR}/token.json" ] && [ -f "${CFG_DIR}/expiration.txt" ] && {
[ "$(cat "${CFG_DIR}/expiration.txt")" -le "$(date +%s)" ] && get_token [ "$(cat "${CFG_DIR}/expiration.txt")" -le "$(date +%s)" ] && get_token || :
} || { } || {
get_token get_token
} }