It was the safe_sleep function. Here's an issue on it [0]. IIRC there was an early issue, but really this is code that never should have made it in. Here's the conditional in question
SECONDS=0
while [[ $SECONDS -lt $1 ]]; do
:
done
Here's the fix... (s/!=/-lt)
while [[ $SECONDS -lt $1 ]];
It's a fallback sleep function for if you don't have the sleep command, (or read, or ping) then it'll increment SECONDS (special variable) until the time has passed because : does nothing (it will peg your CPU though).
Problem is the loop isn't computed with infinite precision. Doesn't take a genius to figure out < is infinitely better than != here and you'd be right to guess that people did in fact waste thousands of dollars getting stuck in infinite loops that were entirely unavoidable.
Here's the actual merge...[1]
At least it didn't take them months to merge this line, which should have existed from day 1 too (a very very well known pattern for writing bash scripts)[2]
Problem is the loop isn't computed with infinite precision. Doesn't take a genius to figure out < is infinitely better than != here and you'd be right to guess that people did in fact waste thousands of dollars getting stuck in infinite loops that were entirely unavoidable.
Here's the actual merge...[1]
At least it didn't take them months to merge this line, which should have existed from day 1 too (a very very well known pattern for writing bash scripts)[2]
[0] https://github.com/actions/runner/issues/3792
[1] https://github.com/actions/runner/pull/3157/changes
[2] https://github.com/meshtastic/firmware/pull/7922