Fix arithmetic expansion for integer comparison in ralph_loop.sh
Ensures total_items and completed_items are explicitly cast to integers using $((...)) arithmetic expansion to prevent floating point values from causing syntax errors in double bracket tests at line 280.
This commit is contained in:
parent
d6b380236b
commit
2ed13c3150
1 changed files with 2 additions and 2 deletions
|
|
@ -272,8 +272,8 @@ should_exit_gracefully() {
|
|||
|
||||
# 4. Check fix_plan.md for completion
|
||||
if [[ -f "@fix_plan.md" ]]; then
|
||||
local total_items=$(grep -c "^- \[" "@fix_plan.md" 2>/dev/null || echo 0)
|
||||
local completed_items=$(grep -c "^- \[x\]" "@fix_plan.md" 2>/dev/null || echo 0)
|
||||
local total_items=$(($(grep -c "^- \[" "@fix_plan.md" 2>/dev/null || echo 0)))
|
||||
local completed_items=$(($(grep -c "^- \[x\]" "@fix_plan.md" 2>/dev/null || echo 0)))
|
||||
|
||||
log_status "INFO" "DEBUG: @fix_plan.md check - total_items:$total_items, completed_items:$completed_items" >&2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue