If there's no BUP_TTY_WIDTH variable already, then environ.get()
will result in None, which cannot be converted to an integer so
we get 0. Then we pass 0 to the other side in the BUP_TTY_WIDTH
environment variable.
Unfortunately, 0 is a really bad default, since textwrap cannot
work with a width of 0, causing tracebacks such as the one Mark
J Hewitt reported:
https://groups.google.com/g/bup-list/c/rfIw3STN2EY/m/C5Y3UrMIAgAJ
Fix this by not passing it through if there's no good value.
Reported-by: Mark J Hewitt <mjh@idnet.com> Reported-by: Alexander Barton <alex@barton.de> Fixes: cd3647c81a25 ("bup: pass TTY width through to sub-command and remote") Reviewed-by: Rob Browning <rlb@defaultvalue.org> Tested-by: Rob Browning <rlb@defaultvalue.org>