-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prior to this commit there was no TTY detection in the manager or tput package. The result was that during non-interactive executions escape sequences would also be written to the output stream. Additionally each frame would also be written. For example, running the following would result in a messy log file: ``` go run examples/advanced/main.go |& tee log.log ``` This introduces changes that do the following: * If a TTY is not detected, do not render any spinner frames * If a TTY is not detected, do not write escape sequences It is also possible to override the above by setting the environment variable `YSMRR_FORCE_TTY` to `true`. This will make ysmrr ignore tty detection and render frames and write escape sequences. An example of the above override can be seen in the `tput_test.go` file.
- Loading branch information
Showing
4 changed files
with
52 additions
and
8 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
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