restic/internal
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
..
archiver Merge pull request #3243 from restic/fix-scanner-overlap 2021-01-30 21:17:21 +01:00
backend Merge pull request #3327 from MichaelEischer/fix-s3-sanity-check 2021-03-11 13:13:46 +01:00
cache Add more error handling 2021-01-30 20:19:47 +01:00
checker Address issues reported by golint 2021-01-30 20:45:57 +01:00
crypto crypto: Remove unused error 2020-09-05 10:07:16 +02:00
debug Allow debug logging to pipes and terminals 2020-10-19 22:30:30 +02:00
dump Add more error handling 2021-01-30 20:19:47 +01:00
errors Don't retry when "no space left on device" in local backend 2020-12-17 12:43:09 +01:00
filter filter: Fix glob matching on absolute path marker on windows 2020-10-09 16:11:05 +02:00
fs Add more error handling 2021-01-30 20:19:47 +01:00
fuse Address issues reported by golint 2021-01-30 20:45:57 +01:00
hashing errcheck: Add error checks 2021-01-30 20:02:37 +01:00
limiter limiter: add unit tests 2021-01-03 22:23:53 +01:00
migrations Fix issues reported by semgrep 2020-12-11 09:41:59 +01:00
mock Add more error handling 2021-01-30 20:19:47 +01:00
options Some options fixes 2020-12-23 23:26:04 +03:00
pack Address issues reported by golint 2021-01-30 20:45:57 +01:00
repository Address review comments 2021-01-30 20:02:37 +01:00
restic Add more error handling 2021-01-30 20:19:47 +01:00
restorer Merge pull request #3362 from greatroar/darwin-preallocate 2021-04-10 22:47:56 +02:00
selfupdate self-update: Don't cancel download after 30 seconds 2019-02-23 11:15:18 +01:00
test Add more error handling 2021-01-30 20:19:47 +01:00
textfile Add more error handling 2021-01-30 20:19:47 +01:00
ui Unify interactive terminal detection code 2021-04-11 20:02:09 +02:00
walker errcheck: More error handling 2021-01-30 20:02:37 +01:00