Skip to content

Commit

Permalink
fix: mc rb --force return ok with bucketNotExists (#4927)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuker authored May 9, 2024
1 parent 45ae315 commit 5378c95
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/rb-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,17 @@ func mainRemoveBucket(cliCtx *cli.Context) error {
if err != nil {
switch err.ToGoError().(type) {
case BucketNameEmpty:
case BucketDoesNotExist:
if isForce {
continue
}
errorIf(err.Trace(targetURL), "Unable to validate target `"+targetURL+"`.")
cErr = exitStatus(globalErrorExitStatus)
continue
default:
errorIf(err.Trace(targetURL), "Unable to validate target `"+targetURL+"`.")
cErr = exitStatus(globalErrorExitStatus)
continue

}
}

Expand Down

0 comments on commit 5378c95

Please sign in to comment.