terminus icon indicating copy to clipboard operation
terminus copied to clipboard

AL-1038: Fixes #1697, terminus whoami no longer exits with 1

Open greg-1-anderson opened this issue 6 years ago • 3 comments

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.

greg-1-anderson avatar Jan 11 '19 06:01 greg-1-anderson

The tests need updating here. Is [error] an acceptable output for users who are not logged in, @TeslaDethray ?

greg-1-anderson avatar Jan 12 '19 15:01 greg-1-anderson

@greg-1-anderson No, not being logged in is not an erroneous state.

TeslaDethray avatar Jan 15 '19 21:01 TeslaDethray

OK we'll allow for non-erroneous, non-status-0 exits in the upstream then.

greg-1-anderson avatar Jan 15 '19 21:01 greg-1-anderson