s5cmd
s5cmd copied to clipboard
`s5cmd sync` silently fails when syncing from bucket in wrong region
If e.g. we are running in us-east-2:
$ s5cmd sync 's3://my-us-east-1-bucket/example/*' /tmp/example/
ERROR "sync s3://my-us-east-1-bucket/example/* /tmp/example/": BucketRegionError: incorrect region, the bucket is not in 'us-east-2' region at endpoint '', bucket is in 'us-east-1' region status code: 301, request id: <redacted>, host id: <redacted>
$ echo $?
0
Even if cross-region syncs are not supported, they shouldn't silently fail - I would expect a non-zero exit code here.
Related: https://github.com/peak/s5cmd/issues/816