mirror of
https://github.com/restic/restic.git
synced 2024-12-25 17:27:25 +00:00
backup: Avoid race between password prompt and open repository message
`term.Print` sends the output via a channel to a goroutine which actually prints the message. This may race with the password prompt printed by `OpenRepository` resulting in a missing prompt.
This commit is contained in:
parent
070d43e290
commit
c882a92cd6
1 changed files with 1 additions and 1 deletions
|
@ -415,7 +415,7 @@ func runBackup(opts BackupOptions, gopts GlobalOptions, term *termstatus.Termina
|
|||
var t tomb.Tomb
|
||||
|
||||
if gopts.verbosity >= 2 && !gopts.JSON {
|
||||
term.Print("open repository\n")
|
||||
Verbosef("open repository\n")
|
||||
}
|
||||
|
||||
repo, err := OpenRepository(gopts)
|
||||
|
|
Loading…
Reference in a new issue