terminus
terminus copied to clipboard
AL-1038: Fixes #1697, terminus whoami no longer exits with 1
The annotated command library really wants to print '[error]' when the exit code is non-zero, for consistency. If that is okay, then the fix is trivial, as shown.
If the desire is to maintain a '[notice]' and still have the exit code be non-zero, then a modification to the annotated command library would be necessary. We could simply omit the '[error]' output when the message is empty. Consistency is probably better, though; it might be odd to have the command appear to finish successfully, but still set a non-zero exit code.
The tests need updating here. Is [error]
an acceptable output for users who are not logged in, @TeslaDethray ?
@greg-1-anderson No, not being logged in is not an erroneous state.
OK we'll allow for non-erroneous, non-status-0 exits in the upstream then.