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 rb --force minio/my-bucket should be idempotent #4880

Closed
binaryfire opened this issue Mar 19, 2024 · 0 comments · Fixed by #4927
Closed

mc rb --force minio/my-bucket should be idempotent #4880

binaryfire opened this issue Mar 19, 2024 · 0 comments · Fixed by #4927

Comments

@binaryfire
Copy link

binaryfire commented Mar 19, 2024

Similar to #4863

In Linux, using the force flag when removing directories (rm -rf) doesn't throw an error if the directory doesn't exist. This is by design: -rf is the equivalent of saying "just make sure the directory doesn't exist". That allows it to be used idempotently in scripts.

Similarly I think the --force flag in mc rb --force minio/my bucket should make the command idempotent. Instead of exiting with an exit code of 1 and mc: <ERROR> Unable to validate target 'minio/my-bucket'. Bucket 'my-bucket' does not exist message, it would be better if the exit code was 0 and a simpler informational message like mc: Bucket 'my-bucket' does not exist was shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants