Commit 99c5fb8
committed
message: don't write progress-bar escape to non-TTY stderr
msg() prefixed every line with the \r\033[K progress-line eraser even
when stderr was a pipe or file. Progress bars are drawn only on a TTY
(all draw_* helpers gate on sys.stderr.isatty()), so off a TTY there is
never a partial line to clear — the escape merely injected control
characters into redirected logs (e.g. 'pd list 2>out.txt'). Emit the
eraser only when stderr is a TTY.1 parent 2b37734 commit 99c5fb8
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
178 | | - | |
179 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
180 | 190 | | |
181 | 191 | | |
182 | 192 | | |
| |||
0 commit comments