boltops-tools / terraspace

Terraspace: The Terraform Framework
https://terraspace.cloud
Apache License 2.0
678 stars 46 forks source link

feat: add support for exit code in terraspace fmt command #308

Closed duckst3r closed 1 year ago

duckst3r commented 1 year ago

This is a 🙋‍♂️ feature or enhancement.

Summary

This change add support for exit 1 return code while running terraspace fmt command with errors.

Note : I am not a ruby developer, feel free to give me insights to improve the code.

How to Test

Just test the exit code while running terraspace fmt for the following scenarii :

  1. The configuration has no error, terraform fmt SHOULD return exit code 0.
  2. The configuration has one or more error, terraform fmt SHOULD run until the end and SHOULD return a exit code 1.
tongueroo commented 1 year ago

Released in terraspace v2.2.7 Thanks!