Skip to content

mc mirror --watch should exit with non-zero status code on failure #5162

@jadolg

Description

@jadolg

Expected behavior

When any error occurs during the mirror operation, mc should exit with a non-zero status code instead of just logging the error and continuing.

Actual behavior

mc logs the errors but continues to run.

Steps to reproduce the behavior

Try anything that would cause a problem like non existing bucket in the destination.

mc --version

mc version RELEASE.2025-02-15T10-36-16Z (commit-id=383560b1c3d6912042e8c8c275bb78e83e67ef2b)
Runtime: go1.23.6 linux/amd64

System information

Ubuntu 22.04
5.15.0-122-generic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions