Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Errors don't set a nonzero exit code #231

Closed
mon opened this issue Jun 19, 2019 · 1 comment · Fixed by #258
Closed

Errors don't set a nonzero exit code #231

mon opened this issue Jun 19, 2019 · 1 comment · Fixed by #258

Comments

@mon
Copy link

mon commented Jun 19, 2019

This makes it more difficult to detect problems when integrating nrfutil in build systems.

By replacing the current click.echo, return with raise click.Exception, 1 is returned and my build stops as expected. Should I use a more specialised exception class such as click.UsageError?

@bihanssen
Copy link
Contributor

@mon, good point about nonzero exit code.
I believe the more specialized exception classes should be used where appropriate, as click will then try to add context info to the error message.

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

Successfully merging a pull request may close this issue.

2 participants