Errors don't set a nonzero exit code
mon opened this issue · comments
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
?
@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.