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

Fix exitcode bug introduced in PR/125 #429

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dmsolutionsmn
Copy link

Due to #125 any terraform exit code of 2 will be considered passing even when it is a valid failure.

For example, terraform fmt can return 0, 2, or 3. (see https://github.com/hashicorp/terraform/blob/v1.9.3/internal/command/fmt.go#L96 )

  • 0 - success
  • 2 - has errors
  • 3 - check is enabled and failed to pass check

The proposed solution in this PR is to verify that -detailed-exitcode argument was passed in. Additional test scenarios were added to cover the original pull request and this change.

@dmsolutionsmn dmsolutionsmn requested a review from a team as a code owner August 7, 2024 06:29
Copy link

hashicorp-cla-app bot commented Aug 7, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant