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:
Michael Eischer
2025-09-24 22:04:38 +02:00
committed by GitHub
8 changed files with 63 additions and 13 deletions

View File

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