1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 01:06:39 +00:00

Merge pull request #3305 from juergenhoetzel/terminal-race-condition

backup: In case of error also Wait() for terminal goroutine
This commit is contained in:
MichaelEischer 2021-03-08 22:20:18 +01:00 committed by GitHub
commit a0f9d73d44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -0,0 +1,6 @@
Bugfix: Fix possibly missing backup summary of json output in case of error
When using --json output it happened from time to time that the summary output
was missing in case an error occurred. This has been fixed.
https://github.com/restic/restic/pull/3305

View file

@ -60,11 +60,11 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea
t.Go(func() error { term.Run(t.Context(globalOptions.ctx)); return nil })
err := runBackup(backupOptions, globalOptions, term, args)
if err != nil {
return err
}
t.Kill(nil)
return t.Wait()
if werr := t.Wait(); werr != nil {
panic(fmt.Sprintf("term.Run() returned err: %v", err))
}
return err
},
}