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: exit commands with non zero exit code if plan or apply fails #1257

Merged
merged 3 commits into from
May 9, 2024

Conversation

suzuki-shunsuke
Copy link
Owner

@suzuki-shunsuke suzuki-shunsuke commented May 9, 2024

Close #1187

This pull request changes the exit code of tfcmt when an error happens.
The exit code was same with the exit code of terraform plan and terraform apply.
This means tfcmt might have exited with zero even if tfcmt failed to post a comment due to some reason such as API rate limit.
This was not a bug but a expected behavior.
But this behaviour was dangerous because people might have missed unexpected changes.

So this pull request changes the behaviour as tfcmt exits with non zero if any error such as API rate limit happens.

@suzuki-shunsuke suzuki-shunsuke merged commit 6ee25f1 into main May 9, 2024
8 checks passed
@suzuki-shunsuke suzuki-shunsuke deleted the fix-exit-non-zero branch May 9, 2024 06:15
@suzuki-shunsuke suzuki-shunsuke added this to the v4.9.1 milestone May 9, 2024
@suzuki-shunsuke suzuki-shunsuke mentioned this pull request May 9, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Exit code 0 even if fails to post comment
1 participant