Commit 3b26b45
committed
fix(AsyncTmuxCmd): Handle text decoding manually for async subprocess
The AsyncTmuxCmd class was updated to handle text decoding manually since asyncio.create_subprocess_exec() doesn't support the text=True parameter that subprocess.Popen() supports.
Changes:
- Remove text=True and errors=backslashreplace from create_subprocess_exec()
- Handle bytes output by manually decoding with decode(errors="backslashreplace")
- Keep string processing logic consistent with tmux_cmd class
This fixes the ValueError("text must be False") error that occurred when trying to use text mode with asyncio subprocesses. The async version now properly handles text decoding while maintaining the same behavior as the synchronous tmux_cmd class.1 parent a461be9 commit 3b26b45
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
372 | | - | |
373 | 371 | | |
374 | | - | |
| 372 | + | |
375 | 373 | | |
376 | 374 | | |
377 | 375 | | |
| |||
383 | 381 | | |
384 | 382 | | |
385 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
| |||
0 commit comments