Skip to content

Commit 83629ad

Browse files
committed
tmux_cmd: Pass backslashreplace for errors in subprocess
More resilience for `tmux` command across systems. Ability to debug because escape sequences preserves the byte value for debugging.
1 parent 4ae24ee commit 83629ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libtmux/common.py

+1
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ def __init__(self, *args: t.Any) -> None:
236236
stdout=subprocess.PIPE,
237237
stderr=subprocess.PIPE,
238238
text=True,
239+
errors="backslashreplace",
239240
)
240241
stdout, stderr = self.process.communicate()
241242
returncode = self.process.returncode

0 commit comments

Comments
 (0)