Describe the bug
Calling terramate fmt --detailed-exit-code does return status code 2 when a terramate file is incorrectly formatted, but it does not actually format the file.
To Reproduce
Steps to reproduce the behavior:
Change a terramate file in a way that it's incorrectly formatted (e.g. by including spaces)
Run command terramate fmt --detailed-exit-code
The exit code will be 2, but the file will not have changed
Expected behaviorterramate fmt --detailed-exit-code should format the files so that it's consistent with terramate generate --detailed-exit-code.
Environment (please complete the following information):
Thanks for catching this little regression here. We are going to fix the issue and send out a release asap. And apologies that we missed the comment in the original issue. Fixing now ;)
Describe the bug Calling
terramate fmt --detailed-exit-code
does return status code2
when a terramate file is incorrectly formatted, but it does not actually format the file.To Reproduce
Steps to reproduce the behavior:
terramate fmt --detailed-exit-code
2
, but the file will not have changedExpected behavior
terramate fmt --detailed-exit-code
should format the files so that it's consistent withterramate generate --detailed-exit-code
.Environment (please complete the following information):
Additional context Originally commented in https://github.com/terramate-io/terramate/issues/1312#issuecomment-1951797427