Skip to content

Commands do not propagate errors to the return status #43

@niooss-ledger

Description

@niooss-ledger

When some ledgerctl commands fail, an error message can be written but the program returns a successful error code. For example:

$ ledgerctl info
No Ledger device has been found.
$ echo $?
0
$ ledgerctl install-ca ledgerctl
The device is not in recovery mode.
$ echo $?
0

It feels more natural to return an non-zero value for example in

sys.exit(0)

Also, the message could be prefixed by something indicating that an error happened (for example Error: No Ledger device has been found. or [ERROR] No Ledger device has been found. or [!] No Ledger device has been found.). What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions