Skip to content

Commit 99f0354

Browse files
committed
run_before_script: Trim newlines
1 parent 001b85c commit 99f0354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tmuxp/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ def run_before_script(
6565
# Read one line from stderr, if available
6666
line_err = proc.stderr.readline() if proc.stderr else ""
6767

68-
if line_out:
68+
if line_out and line_out.strip():
6969
out_buffer.append(line_out)
7070
if is_out_tty:
7171
sys.stdout.write(line_out)
7272
sys.stdout.flush()
7373

74-
if line_err:
74+
if line_err and line_err.strip():
7575
err_buffer.append(line_err)
7676
if is_err_tty:
7777
sys.stderr.write(line_err)

0 commit comments

Comments
 (0)