Ticket #22142 (closed defect: fixed)
"port variants" line-wrapping breaks if terminal columns 0
|Reported by:||jxh@…||Owned by:||macports-tickets@…|
|Keywords:||columns wrap variants xterm stty||Cc:|
My xterms always start out with:
$ stty -a speed 38400 baud; 0 rows; 0 columns;
and this makes "ports variants dbus" (for instance) wrap its text as though one had actually set COLUMNS=0 in the environment:
$ /opt/local/bin/port variants dbus dbus has the variants: no_root: Run the DBUS daemon as MacPorts install user. [...]
There is some code that reads this through Pextlib and term_get_size, but it arguably shouldn't take a 0 result as quite real. If it leaves env(COLUMNS) alone, wraplabel, called from action_variants, will do the right thing.
The attached diff shows a suggested fix.
This is Snow Leopard, Mac OS 10.6.