evmar / n2

n2 ("into"), a ninja compatible build system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Progress code can panic on bad term info

dae opened this issue · comments

I got the following when I tried to use n2 via a buildkite CI runner on macOS:

thread 'main' panicked at 'byte index 18446744073709551612 is out of bounds of 0s build:configure', src/progress.rs:185:40
 
I presume it's getting a max columns of 0 and wrapping around. Forcing a minimum of 4 should fix the crash, but it might also be good to fall back on the default of 80 if it's 0.

Thanks for the clear report!