mirror of
https://github.com/restic/restic.git
synced 2026-10-08 11:27:12 +00:00
Merge pull request #4815 from greatroar/termstatus
Termstatus refactoring
This commit is contained in:
4 files changed
+49
-76
No files matched your search
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"sync"
|
||||
|
||||
"github.com/restic/restic/internal/ui"
|
||||
"github.com/restic/restic/internal/ui/termstatus"
|
||||
)
|
||||
|
||||
@@ -31,8 +30,7 @@ func setupTermstatus() (*termstatus.Terminal, func()) {
|
||||
|
||||
// use the termstatus for stdout/stderr
|
||||
prevStdout, prevStderr := globalOptions.stdout, globalOptions.stderr
|
||||
stdioWrapper := ui.NewStdioWrapper(term)
|
||||
globalOptions.stdout, globalOptions.stderr = stdioWrapper.Stdout(), stdioWrapper.Stderr()
|
||||
globalOptions.stdout, globalOptions.stderr = termstatus.WrapStdio(term)
|
||||
|
||||
return term, func() {
|
||||
// shutdown termstatus
|
||||
|
||||
Reference in new issue
Block a user