Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commands do not propagate errors to the return status #43

Open
niooss-ledger opened this issue Jul 8, 2022 · 0 comments
Open

Commands do not propagate errors to the return status #43

niooss-ledger opened this issue Jul 8, 2022 · 0 comments

Comments

@niooss-ledger
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant