From 2b8a529878870f99cc8d5382ad65dd7abcefc25b Mon Sep 17 00:00:00 2001 From: Christian Colglazier Date: Sun, 20 Sep 2026 06:44:21 -0400 Subject: [PATCH] fix(scripts): retry usage fetch in watch mode --- home/bin/executable_openai-usage.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home/bin/executable_openai-usage.sh b/home/bin/executable_openai-usage.sh index f77cb01..c6c4ea2 100644 --- a/home/bin/executable_openai-usage.sh +++ b/home/bin/executable_openai-usage.sh @@ -184,7 +184,11 @@ require_command jq find_auth_file while true; do - response=$(fetch_usage) + if ! response=$(fetch_usage); then + [[ -n "$watch_interval" ]] || exit 1 + sleep "$watch_interval" + continue + fi print_usage "$response" [[ -n "$watch_interval" ]] || break