minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

mc cp exit status is zero on ERROR #4773

Closed mikhail-shevtsov-wiregate closed 10 months ago

mikhail-shevtsov-wiregate commented 11 months ago

Expected behavior

mc should exit with non-zero status if any ERROR's encountered

Actual behavior

mc exist status is zero

Steps to reproduce the behavior

root@dec00a348530:/app# mc cp s3/default/1.mp4 1.mp4
mc: <ERROR> Unable to prepare URL for copying. Unable to guess the type of copy operation.
root@dec00a348530:/app# echo $?
0

mc --version

mc version RELEASE.2023-11-20T16-30-59Z (commit-id=937b34616f012ad30e1cd6fd61e1da25ff931648)
Runtime: go1.21.4 linux/arm64
Copyright (c) 2015-2023 MinIO, Inc.
License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>

System information

Official Docker Image arm64

fancy27 commented 10 months ago

+1, the same with mc mirror