Skip to content

Gitui returns zero exit code on error #1315

Closed
@acceleratesage

Description

@acceleratesage

Describe the bug

When calling gitui in a non-git directory, I get the expected error:

> gitui
invalid path
please run gitui inside of a non-bare git repository

However the exit code is zero:

> echo $?
0

Expected behavior
I'd expect a non-zero exit code e.g. 1.

Context (please complete the following information):
This is on macOs 12.5.1 using gitui installed via nix

> gitui --version
gitui 0.21.0

Additional context
This is a problem when scripting shortcuts to call gitui in a directory as errors get swallowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions