Skip to content

Should "gmt which -G" and "gmt get -D" report failed downloads through their exit status? #9195

Closed

Description

@Esteban82

Both print [ERROR] lines, download nothing, and still exit 0:

$ gmt which -Ga @this_does_not_exist_9999.nc; echo "exit = $?"
gmtwhich [ERROR]: Unable to obtain remote file @this_does_not_exist_9999.nc
gmtwhich [ERROR]: File @this_does_not_exist_9999.nc not found!
exit = 0
$ gmt get -Ddata=earth_mask -I2g; echo "exit = $?"
exit = 0

Claude suggests these should exit non-zero, so a CI cache job can tell a complete download from a partial one.

Should I create a PR to change the output? Or should I just leave it at 0?

Activity

  1. added
    feature request
    on Sep 10, 2026
  2. joa-quim commented on Sep 10, 2026

    @joa-quim
    Member

    Well, it errors it should not return 0.

  3. Esteban82 commented on Sep 11, 2026

    @Esteban82
    MemberAuthor

    Ok, I will create a PR.

  4. added a commit that references this issue on Sep 11, 2026
    4872bb2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions