You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mc return non-zero exit code on error, when --json return error
Actual behavior
mc return zero exit code, while --json show error
Steps to reproduce the behavior
scherepanov@xxxxxxx:~/prod/bin$ mc update
You are already running the most recent version of ‘mc’.
scherepanov@xxxxxxx:~/prod/bin$ mc get sadfasdf/asdfdaf/dfsdf /tmp --json
{
"status": "error",
"error": {
"message": "Unable to download.",
"cause": {
"message": "Source is not s3.",
"error": {}
},
"type": "error"
}
}
scherepanov@xxxxxx:~/prod/bin$ echo $?
0
mc --version
(paste output of mc --version)
mc version RELEASE.2025-08-13T08-35-41Z (commit-id=7394ce0dd2a80935aded936b09fa12cbb3cb8096)
Runtime: go1.24.6 linux/amd64
Copyright (c) 2015-2025 MinIO, Inc.
License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html