From 99f0354229ec75b1bbf560af7f42876e61807ae0 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 2 Feb 2025 09:48:24 -0600 Subject: [PATCH 1/2] run_before_script: Trim newlines --- src/tmuxp/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tmuxp/util.py b/src/tmuxp/util.py index bac9093ed1..490ee7e940 100644 --- a/src/tmuxp/util.py +++ b/src/tmuxp/util.py @@ -65,13 +65,13 @@ def run_before_script( # Read one line from stderr, if available line_err = proc.stderr.readline() if proc.stderr else "" - if line_out: + if line_out and line_out.strip(): out_buffer.append(line_out) if is_out_tty: sys.stdout.write(line_out) sys.stdout.flush() - if line_err: + if line_err and line_err.strip(): err_buffer.append(line_err) if is_err_tty: sys.stderr.write(line_err) From 7f1b86221b60b480b7e6e79a41e77bc48f4aae81 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 2 Feb 2025 09:55:31 -0600 Subject: [PATCH 2/2] docs(CHANGES) Note additional output capturing fix --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index fcaf116824..9cb9a11772 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,10 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force +### Bug fixes + +- `run_before_script()`: Additional output capturing improvements (#960) + ## tmuxp 1.52.1 (2025-02-02) ### Bug fixes