mirror of
https://github.com/restic/restic.git
synced 2026-02-03 04:20:45 -05:00
termstatus: track current status also in background
Without this, restic could temporarily print an outdated status when moving back into the foreground.
This commit is contained in:
parent
48cbbf9651
commit
0ab38faa2e
1 changed files with 2 additions and 2 deletions
|
|
@ -142,13 +142,13 @@ func (t *Terminal) run(ctx context.Context) {
|
|||
}
|
||||
|
||||
case stat := <-t.status:
|
||||
status = append(status[:0], stat.lines...)
|
||||
|
||||
if terminal.IsProcessBackground(t.fd) {
|
||||
// ignore all messages, do nothing, we are in the background process group
|
||||
continue
|
||||
}
|
||||
|
||||
status = status[:0]
|
||||
status = append(status, stat.lines...)
|
||||
t.writeStatus(status)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue