Skip to content

Failed MarkBind commands should exit with nonzero return code #651

Description

@Xenonym

Tell us about your environment

  • MarkBind Version: 1.17.1

What did you do? Please include the actual source code causing the issue.
I ran a MarkBind command that failed (exited due to unrecoverable errors). For example, markbind build on a directory that does not have a config file.

What did you expect to happen?
MarkBind should exit with a nonzero return code (eg. 1) to indicate an error condition. This is especially important for running MarkBind in an automated context where other programs or scripts are relying on the exit code of MarkBind to detect errors (eg. as part of a custom build script, or Travis CI automation).

What actually happened? Please include the actual, raw output.
MarkBind exits with a zero return code, incorrectly indicating that MarkBind ran successfully.

On PowerShell:

PS C:\Users\pzy5a> markbind build
error: No config file found in parent directories of C:\Users\pzy5a
PS C:\Users\pzy5a> $LASTEXITCODE
0

On Bash:

pzy5a@Xenon-XPS MINGW64 ~ 
$ markbind build
error: No config file found in parent directories of C:\Users\pzy5a

pzy5a@Xenon-XPS MINGW64 ~
$ echo $?
0

Related: #601

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions