suzuki-shunsuke / tfcmt

tfcmt enhances mercari/tfnotify in many ways, including Terraform >= v0.15 support and advanced formatting options
https://suzuki-shunsuke.github.io/tfcmt/
Other
416 stars 45 forks source link

fix: exit commands with non zero exit code if plan or apply fails #1257

Closed suzuki-shunsuke closed 6 months ago

suzuki-shunsuke commented 6 months ago

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.