-
Notifications
You must be signed in to change notification settings - Fork 574
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
chore: Fix IaC test exit code when issues are found #3501
Conversation
e8cadfb
to
8320f44
Compare
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.
LGTM
the rest of the exit codes are working as expected?
8320f44
to
7712b57
Compare
@YairZ101 The exit code for failures is |
3d74c5d
to
f9e2aee
Compare
What stops us from fixing the other 2 error codes now as well? |
In general I would separate these to their own PRs to ensure we review these cautiously and decouple the changes. |
f9e2aee
to
99b8ee0
Compare
okay, please make sure to open a ticket for this bug so we could track it. |
What does this PR do?
1
instead of0
, as is expected by the Snyk CLI (source).Where should the reviewer start?
How should this be manually tested?
snyk iac test
with a directory/file with issues, in all three formats: text, JSON, SARIF.snyk iac test --experimental
with a directory/file with issues, in all three formats: text, JSON, SARIF.snyk iac test
with a directory/file without issues, in all three formats: text, JSON, SARIF.snyk iac test --experimental
with a directory/file without issues, in all three formats: text, JSON, SARIF.Any background context you want to provide?
0
, but based on the status codes list in the CLI’s help doc:We should receive
1
when issues were found.Running
snyk iac test
in all output formats confirms it, as it currently returns exist code1
.Additional information