mirror of
https://github.com/minio/mc.git
synced 2025-07-31 18:24:21 +03:00
mc heal
and mc mirror
should respond with proper exit code (#2543)
respond with os.exit(0) incase of errors Fixes #2534 #2474
This commit is contained in:
committed by
kannappanr
parent
c9f33698fc
commit
b2d2e09105
@ -131,5 +131,5 @@ func mainAdminHeal(ctx *cli.Context) error {
|
|||||||
"Unable to display follow heal status.",
|
"Unable to display follow heal status.",
|
||||||
)
|
)
|
||||||
|
|
||||||
return nil
|
return herr
|
||||||
}
|
}
|
||||||
|
@ -96,11 +96,13 @@ var errInvalidTarget = func(URL string) *probe.Error {
|
|||||||
return probe.NewError(invalidTargetErr(errors.New(msg))).Untrace()
|
return probe.NewError(invalidTargetErr(errors.New(msg))).Untrace()
|
||||||
}
|
}
|
||||||
|
|
||||||
type overwriteNotAllowedErr error
|
type overwriteNotAllowedErr struct {
|
||||||
|
error
|
||||||
|
}
|
||||||
|
|
||||||
var errOverWriteNotAllowed = func(URL string) *probe.Error {
|
var errOverWriteNotAllowed = func(URL string) *probe.Error {
|
||||||
msg := "Overwrite not allowed for `" + URL + "`. Use `--overwrite` to override this behavior."
|
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
|
type sourceIsDirErr error
|
||||||
|
Reference in New Issue
Block a user