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 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)