terraform-plugin-docs icon indicating copy to clipboard operation
terraform-plugin-docs copied to clipboard

Detailed Exit Codes

Open sheneska opened this issue 1 year ago • 0 comments

Terraform CLI and terraform-plugin-docs Versions

github.com/hashicorp/terraform-plugin-docs v0.19.3

Use Cases or Problem Statement

Currently, when the tfplugindocs commands are executed there are no exit codes to explicitly indicate whether the command run was successful or not. While this may be fine for the tfplugindocs migrate and validate commands, I believe having a detailed exit code that indicates what exactly happened would be a good way to assess changes, as opposed to having to look at each .md file manually. These codes will indicate to the contributor to be easily aware of the status of their changes as it relates to the tool.

Proposal

Some detailed exit codes: -detailed-exitcode Return detailed exit codes when the command exits.

                         This will change the meaning of exit codes to:

                         0 - Succeeded, diff is empty (no changes)

                         1 - Errored

                         2 - Succeeded, there is a diff

How much impact is this issue causing?

Low

Additional Information

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

sheneska avatar Jun 04 '24 03:06 sheneska