Skip to content
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

Return correct exit code on failure (AST-57074) #908

Merged
merged 2 commits into from
Oct 14, 2024
Merged

Conversation

sarahCx
Copy link
Contributor

@sarahCx sarahCx commented Oct 14, 2024

By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

This change has been to ensure that users receive accurate exit codes,
the CLI will now display any errors that occur and exit with the appropriate exit code (e.g., 1 for errors, 0 for success). This allows users to effectively handle error conditions and automate tasks based on the CLI's exit status.

References

https://checkmarx.atlassian.net/browse/AST-57074

Testing

Verified that tasks now correctly return an exit code of "1" on error and "0" on success.

Checklist

  • I have added documentation for new/changed functionality in this PR (if applicable).
  • I have updated the CLI help for new/changed functionality in this PR (if applicable).
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used

@github-actions github-actions bot added the bug Something isn't working label Oct 14, 2024
@OrShamirCM OrShamirCM requested a review from a team October 14, 2024 12:26
Copy link

Logo
Checkmarx One – Scan Summary & Details696f00e9-7b65-429f-a031-7f2a12f657e1

Policy Management Violations

Policy Name Rule(s) Break Build
[SAST-ML0] Not allowed NEW Sast vulnerabilities true

No New Or Fixed Issues Found

@sarahCx sarahCx changed the title Return correct exit code on failure (AST-57074) ReturnCorrectExitCodeOnFailure(AST-57074) Oct 14, 2024
@sarahCx sarahCx changed the title ReturnCorrectExitCodeOnFailure(AST-57074) ReturnCorrectExitCodeOnFailure Oct 14, 2024
@sarahCx sarahCx changed the title ReturnCorrectExitCodeOnFailure Return correct exit code on failure (AST-57074) Oct 14, 2024
@sarahCx sarahCx enabled auto-merge October 14, 2024 14:26
@sarahCx sarahCx merged commit 8bcbea2 into main Oct 14, 2024
19 of 22 checks passed
@sarahCx sarahCx deleted the bug/handlingErrors branch October 14, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants