Skip to content

CLI exits 0 when a merge fails #273

Description

@shimoncohen

Describe the bug
The CLI exits with code 0 when a merge fails. Main logs the exception and returns, so scripts and CI that check the exit code treat a failed merge as a success. The same happens for an invalid command, sources that fail to parse, and fewer than two sources.

To Reproduce

  1. Run a merge that fails partway, e.g. an S3 target that times out, or a read-only source GPKG on master (Merger rewrites source GPKGs into WAL mode and fails on read-only sources #272).
  2. The log shows [Error] ... One or more errors occurred and the merge stops before the full tile count.
  3. echo $? prints 0.

Expected behavior
Any failed or rejected run exits non-zero; only a completed merge exits 0.

Additional context

  • Where: MergerCli/Program.cs, Main. The early-exit and catch paths return from a void Main. Only the missing resume file already exits non-zero, via Environment.Exit(-1).
  • Present in v2.2.3 and on master.

Activity

  1. added
    bug
    on Nov 24, 2026
  2. self-assigned this
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions