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:
Michael Eischer 2020-05-01 22:38:03 +02:00
parent 070d43e290
commit c882a92cd6
1 changed files with 1 additions and 1 deletions

View File

@ -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)