1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-24 16:54:00 +00:00
restic/internal/ui
Michael Eischer 5e6af77b7a Unify interactive terminal detection code
Previously the progress bar / status update interval used
stdoutIsTerminal to determine whether it is possible to update the
progress bar or not. However, its implementation differed from the
detection within the backup command which included additional checks to
detect the presence of mintty on Windows. mintty behaves like a terminal
but uses pipes for communication.

This adds stdoutCanUpdateStatus() which calls the same terminal detection
code used by backup. This ensures that all commands consistently switch
between interactive and non-interactive terminal mode.

stdoutIsTerminal() now also returns true whenever stdoutCanUpdateStatus()
does so. This is required to properly handle the special case of mintty.
2021-04-11 20:02:09 +02:00
..
json errcheck: More error handling 2021-01-30 20:02:37 +01:00
progress restic: Test progress reporting of StreamTrees 2021-01-28 11:10:50 +01:00
signals ui/progress: extract signal handling into own package 2020-12-29 16:32:18 +01:00
table avoiding unnecessary type conversions 2019-06-30 23:58:00 +03:00
termstatus Unify interactive terminal detection code 2021-04-11 20:02:09 +02:00
backup.go ui: Simlify channel receive 2021-01-28 10:42:02 +01:00
message.go Use new archiver code for backup 2018-04-28 22:08:11 +02:00
stdio_wrapper.go Simplify ui.StdioWrapper.Write 2020-10-17 20:30:46 +02:00
stdio_wrapper_test.go Simplify ui.StdioWrapper.Write 2020-10-17 20:30:46 +02:00