1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 19:40:07 +00:00

refactor: Update shell arithmetic increment syntax from ((var++)) || true to var=$((var + 1)) across various scripts.

This commit is contained in:
tw93
2026-02-28 11:10:18 +08:00
parent 7d70889ad4
commit c19a0276b8
22 changed files with 141 additions and 141 deletions

View File

@@ -878,18 +878,18 @@ validate_terminal_environment() {
# Check if TERM is set
if [[ -z "${TERM:-}" ]]; then
log_warning "TERM environment variable not set"
((warnings++)) || true
warnings=$((warnings + 1))
fi
# Check if running in a known problematic terminal
case "${TERM:-}" in
dumb)
log_warning "Running in 'dumb' terminal, limited functionality"
((warnings++)) || true
warnings=$((warnings + 1))
;;
unknown)
log_warning "Terminal type unknown, may have display issues"
((warnings++)) || true
warnings=$((warnings + 1))
;;
esac
@@ -898,7 +898,7 @@ validate_terminal_environment() {
local cols=$(tput cols 2> /dev/null || echo "80")
if [[ "$cols" -lt 60 ]]; then
log_warning "Terminal width, $cols cols, is narrow, output may wrap"
((warnings++)) || true
warnings=$((warnings + 1))
fi
fi