mirror of
https://github.com/restic/restic.git
synced 2026-08-25 15:03:17 +00:00
backup: extract StdioWrapper from ProgressPrinters
The StdioWrapper is not used at all by the ProgressPrinters. It is called a bit earlier than previously. However, as the password prompt directly accessed stdin/stdout this doesn't cause problems.
This commit is contained in:
@@ -14,7 +14,6 @@ import (
|
||||
// TextProgress reports progress for the `backup` command.
|
||||
type TextProgress struct {
|
||||
*ui.Message
|
||||
*ui.StdioWrapper
|
||||
|
||||
term *termstatus.Terminal
|
||||
}
|
||||
@@ -25,9 +24,8 @@ var _ ProgressPrinter = &TextProgress{}
|
||||
// NewTextProgress returns a new backup progress reporter.
|
||||
func NewTextProgress(term *termstatus.Terminal, verbosity uint) *TextProgress {
|
||||
return &TextProgress{
|
||||
Message: ui.NewMessage(term, verbosity),
|
||||
StdioWrapper: ui.NewStdioWrapper(term),
|
||||
term: term,
|
||||
Message: ui.NewMessage(term, verbosity),
|
||||
term: term,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user