-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log explanation of non-zero exit with found results #431
Conversation
Hm.. what do you think of using a flag to control the exit code on found results (like Without the flag, With the flag |
I think it would be ideal if we did two additional things:
It's technically a breaking change but I don't think we need to cut v4 just yet 😅 |
I like the --fail plan. That way we keep the ability to use it in CI, but it also clears up all this confusion. @dustin-decker @mcastorina What do you think of removing the first warning that is based on the error returned for exit code errors, and making the 2nd debug only. That way, running with |
afa12e0
to
dcb487b
Compare
README.md
Outdated
Exit Codes: | ||
- 0: No errors and no results were found. | ||
- 1: An error was encountered. Sources may not have completed scans. | ||
- 183: No errors were encountered, but results were found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: a note here saying 183
only happens with the --fail
flag would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Fixed.
* Log explanation of non-zero exit with found results * Change exit code and add documentation * Adjust exit code handling * Make action fail on found results * Use new overseer * Improve wording * Update README.md
Using exit code 1 is causing confusion because the overseer reports that the child process exited with 1 when debug logging is enabled.
Our options are:
I've opted for the last option to make sure the reason for a non-zero exit is clear. 183 was picked because Windows system code 183 means "Already exists", which could loosely be applied as erroring because the results exist.