trivy-action icon indicating copy to clipboard operation
trivy-action copied to clipboard

Exit-Code: 1 add failure description

Open james-luther opened this issue 1 year ago • 1 comments

How feasilbe is it to give a description on failure. For example, if exit-code: 1 is set, the action fails without any description as to what causes the failure. For pull requests a comment stating the cause would be extremely helpful.

james-luther avatar Aug 03 '22 17:08 james-luther

Currently Trivy follows the UNIX philosophy of exit codes. A non zero exit code implies something "undesirable" happened.

The exit code is supposed to be set by the user, therefore writing logic to indicate what went wrong wouldn't be ideal as it is set by the user in the first place.

simar7 avatar Aug 10 '22 18:08 simar7

I never followed up, thanks! This was my assumption but wasn't sure if there was an option built into the action or no.

james-luther avatar May 31 '23 14:05 james-luther