Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_before_script: Fix newlines #960

Merged
merged 2 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force

<!-- Maintainers, insert changes / features for the next release here -->

### Bug fixes

- `run_before_script()`: Additional output capturing improvements (#960)

## tmuxp 1.52.1 (2025-02-02)

### Bug fixes
Expand Down
4 changes: 2 additions & 2 deletions src/tmuxp/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down