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:
parent
74348be3fa
commit
c15b4bceae
5 changed files with 14 additions and 25 deletions
|
@ -15,7 +15,6 @@ import (
|
|||
// JSONProgress reports progress for the `backup` command in JSON.
|
||||
type JSONProgress struct {
|
||||
*ui.Message
|
||||
*ui.StdioWrapper
|
||||
|
||||
term *termstatus.Terminal
|
||||
v uint
|
||||
|
@ -27,10 +26,9 @@ var _ ProgressPrinter = &JSONProgress{}
|
|||
// NewJSONProgress returns a new backup progress reporter.
|
||||
func NewJSONProgress(term *termstatus.Terminal, verbosity uint) *JSONProgress {
|
||||
return &JSONProgress{
|
||||
Message: ui.NewMessage(term, verbosity),
|
||||
StdioWrapper: ui.NewStdioWrapper(term),
|
||||
term: term,
|
||||
v: verbosity,
|
||||
Message: ui.NewMessage(term, verbosity),
|
||||
term: term,
|
||||
v: verbosity,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue