-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly print multi-line errors (#270)
* fix: correctly print multi-line errors The bug manifested in a situation like this: - A long progress() message is printed, say "AAAAAAAA"; - An error is emitter, and the result of str(error) is a multi-line string where the first line is shorter than the previously-emitted progress() message. Example: "BBBB\nCCCC"; - The newline in the error message is not correctly handled by the printer, meaning that after "BBBB" is written to the terminal the remainder of the line is not cleared. So the end result looks like: > BBBBAAAA > CCCC The "proper" fix for this would mean a big rework on the printer to properly support multi-line messages; for now, fix only the error case by "manually" splitting the error message and printing each line individually. Fixes #263 --------- Co-authored-by: Matt Culler <[email protected]>
- Loading branch information
1 parent
385785d
commit 0ca6940
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters