From 625410f00366cbe6143127bc5100209ea3b398a9 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Wed, 18 Nov 2020 22:12:07 +0100 Subject: [PATCH] Limit progress bar updates to once per second on non-terminal outputs The code accidentally checked whether stdin is a terminal instead of stdout, the former is not relevant here as the output is printed on stdout. --- cmd/restic/progress.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/restic/progress.go b/cmd/restic/progress.go index f38aef9a4..3ac4eef4a 100644 --- a/cmd/restic/progress.go +++ b/cmd/restic/progress.go @@ -16,7 +16,7 @@ func newProgressMax(show bool, max uint64, description string) *progress.Counter } interval := time.Second / 60 - if !stdinIsTerminal() { + if !stdoutIsTerminal() { interval = time.Second } else { fps, err := strconv.ParseInt(os.Getenv("RESTIC_PROGRESS_FPS"), 10, 64)