ui/progress: don't print progress on non-interactive terminals

This reverts to the old behavior of not printing progress updates on
non-interactive terminals. It was accidentally changed in #3058.
This commit is contained in:
Michael Eischer
2020-12-28 23:11:42 +01:00
parent a488d4c847
commit c2ef049f1b
4 changed files with 37 additions and 11 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ func newProgressMax(show bool, max uint64, description string) *progress.Counter
interval := time.Second / 60
if !stdoutIsTerminal() {
interval = time.Second
interval = 0
} else {
fps, err := strconv.ParseInt(os.Getenv("RESTIC_PROGRESS_FPS"), 10, 64)
if err == nil && fps >= 1 {