diff --git a/cmd/admin-heal.go b/cmd/admin-heal.go index 9dfe73e9b1..3bf9f2c166 100644 --- a/cmd/admin-heal.go +++ b/cmd/admin-heal.go @@ -131,5 +131,5 @@ func mainAdminHeal(ctx *cli.Context) error { "Unable to display follow heal status.", ) - return nil + return herr } diff --git a/cmd/typed-errors.go b/cmd/typed-errors.go index fd1590e828..50665be447 100644 --- a/cmd/typed-errors.go +++ b/cmd/typed-errors.go @@ -96,11 +96,13 @@ var errInvalidTarget = func(URL string) *probe.Error { return probe.NewError(invalidTargetErr(errors.New(msg))).Untrace() } -type overwriteNotAllowedErr error +type overwriteNotAllowedErr struct { + error +} var errOverWriteNotAllowed = func(URL string) *probe.Error { msg := "Overwrite not allowed for `" + URL + "`. Use `--overwrite` to override this behavior." - return probe.NewError(overwriteNotAllowedErr(errors.New(msg))) + return probe.NewError(overwriteNotAllowedErr{errors.New(msg)}) } type sourceIsDirErr error