mirror of
https://github.com/restic/restic.git
synced 2025-12-14 13:02:04 +00:00
Merge pull request #5363 from zmanda/fix-gh-5258-backup-exits-with-wrong-code-on-ctrl-c
bugfix: fatal errors do not keep underlying error
This commit is contained in:
@@ -351,7 +351,7 @@ func OpenRepository(ctx context.Context, opts GlobalOptions, printer progress.Pr
|
||||
NoExtraVerify: opts.NoExtraVerify,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, errors.Fatal(err.Error())
|
||||
return nil, errors.Fatalf("%s", err)
|
||||
}
|
||||
|
||||
passwordTriesLeft := 1
|
||||
@@ -478,7 +478,7 @@ func innerOpen(ctx context.Context, s string, gopts GlobalOptions, opts options.
|
||||
|
||||
rt, err := backend.Transport(globalOptions.TransportOptions)
|
||||
if err != nil {
|
||||
return nil, errors.Fatal(err.Error())
|
||||
return nil, errors.Fatalf("%s", err)
|
||||
}
|
||||
|
||||
// wrap the transport so that the throughput via HTTP is limited
|
||||
|
||||
Reference in New Issue
Block a user