fix: use safe arithmetic to avoid exit code 1 from ((attempts++)) when attempts=0

This commit is contained in:
CanbiZ (MickLesk) 2026-01-27 13:47:48 +01:00
parent a6134095d4
commit 6965e3e2ec

View File

@ -1157,7 +1157,7 @@ prompt_input_required() {
# Interactive prompt - loop until non-empty input or use fallback on timeout
local attempts=0
while [[ -z "$response" ]]; do
((attempts++))
attempts=$((attempts + 1))
if [[ $attempts -gt 3 ]]; then
echo -e "${YW}Too many empty inputs - using fallback: ${fallback}${CL}" >&2