multi: wrap all errors

This commit is contained in:
Oliver Gugger
2024-03-07 13:19:28 +01:00
committed by Andras Banki-Horvath
parent 9a28a4c105
commit 648fb22f63
60 changed files with 138 additions and 133 deletions

View File

@@ -150,7 +150,7 @@ func profileAdd(ctx *cli.Context) error {
// All done, store the updated profile file.
f.Profiles = append(f.Profiles, profile)
if err = saveProfileFile(defaultProfileFile, f); err != nil {
return fmt.Errorf("error writing profile file %s: %v",
return fmt.Errorf("error writing profile file %s: %w",
defaultProfileFile, err)
}
@@ -443,7 +443,7 @@ func profileAddMacaroon(ctx *cli.Context) error {
selectedProfile.Macaroons.Jar, macEntry,
)
if err = saveProfileFile(defaultProfileFile, f); err != nil {
return fmt.Errorf("error writing profile file %s: %v",
return fmt.Errorf("error writing profile file %s: %w",
defaultProfileFile, err)
}