Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mc heal and mc mirror should respond with exit code (0) incase of errors #2543

Merged
merged 1 commit into from
Sep 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/admin-heal.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@ func mainAdminHeal(ctx *cli.Context) error {
"Unable to display follow heal status.",
)

return nil
return herr
}
6 changes: 4 additions & 2 deletions cmd/typed-errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down