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

cleanup terraspace fmt exit status return #313

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

tongueroo
Copy link
Contributor

This is a 🙋‍♂️ feature or enhancement.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

Some refactoring/cleanup of #308

Context

related #308

How to Test

  1. write some malform terraform code and then run terraspace fmt and check the exit status, echo $? . It looks like terraform fmt returns 2 and terraspace passes that back up to terraspace fmt
  2. write some good terraform code and then run terraspace fmt and check the exit status, echo $?. That returns 0.

Version Changes

Patch

@tongueroo tongueroo merged commit 6f2e596 into master Jun 7, 2023
@tongueroo tongueroo deleted the terraspace-fmt-exit-status branch June 7, 2023 22:35
@alexjfisher
Copy link
Contributor

@tongueroo Are you sure this is correct? I was looking at this code with the intention of adding a --check option, but couldn't understand how exit status was being tracked. If there are multiple directories, some with errors, some without, doesn't the exit status of the 'last' directory win?

tongueroo added a commit that referenced this pull request Jun 27, 2023
* Error when any dir errors instead of the last dir exit status 
* related #313
@tongueroo
Copy link
Contributor Author

Fixed in 352e639
Fix release in terraspace 2.2.8

Thanks so much again for catching this and pointing it out!

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.

2 participants