Commit 18d72cb
authored
fix(run) Fix live / streaming / flushing of output (#493)
Follow up to #485.
Live updates were broken, e.g. flushing of output during `git clone`
## Summary by Sourcery
Fix live streaming and flushing of subprocess output in `run.py` by switching to byte-mode I/O, preserving carriage returns for progress updates, and decoding output via a console-encoding fallback.
Bug Fixes:
- Restore live updating and flushing of progress output by reading raw bytes (text=False) to preserve carriage-return behavior
- Prevent Unicode errors during decoding by adding a `console_to_str` helper that tries the console’s encoding and falls back to UTF-8
Enhancements:
- Consolidate stdout/stderr line reading into byte streams trimmed and decoded with `console_to_str`2 files changed
+41
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
25 | 37 | | |
26 | 38 | | |
27 | 39 | | |
| |||
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
81 | | - | |
| 93 | + | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
| |||
182 | 194 | | |
183 | 195 | | |
184 | 196 | | |
185 | | - | |
| 197 | + | |
186 | 198 | | |
187 | 199 | | |
188 | 200 | | |
| |||
201 | 213 | | |
202 | 214 | | |
203 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
204 | 224 | | |
205 | 225 | | |
206 | 226 | | |
207 | 227 | | |
208 | | - | |
| 228 | + | |
209 | 229 | | |
210 | 230 | | |
211 | 231 | | |
212 | 232 | | |
213 | 233 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
225 | 244 | | |
226 | | - | |
| 245 | + | |
227 | 246 | | |
228 | 247 | | |
229 | 248 | | |
| |||
0 commit comments