Skip to content

Commit c077eed

Browse files
authored
Fix unit tests
1 parent 9d8e7f1 commit c077eed

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

invoke/runners.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,10 @@ def read_proc_output(self, reader: Callable) -> Generator[str, None, None]:
713713
break
714714
# The incremental decoder will deal with partial characters.
715715
yield decoder.decode(data)
716-
# Emit the final chunk of data
717-
yield decoder.decode(b"", True)
716+
pending_buf, _ = decoder.getstate()
717+
if pending_buf:
718+
# Emit the final chunk of data
719+
yield decoder.decode(b"", True)
718720

719721
def write_our_output(self, stream: IO, string: str) -> None:
720722
"""

0 commit comments

Comments
 (0)