You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### `hcl fmt --stdin` honors `--check` and `--diff`
7
+
8
+
`terragrunt hcl fmt --stdin` ignored `--check` and `--diff`. It printed the reformatted HCL and exited 0 whether or not the input needed formatting.
9
+
10
+
`--check` now exits with status code 1 when the input needs formatting, and `--diff` prints a unified diff labeled `old/stdin` and `new/stdin`. Neither flag prints the formatted content, so getting that content back means running `--stdin` without them.
With [`--check`](/reference/cli/commands/hcl/fmt#check) or [`--diff`](/reference/cli/commands/hcl/fmt#diff), Terragrunt does not print the formatted content. `--check` exits with status code 1 when the input needs formatting, and `--diff` prints a unified diff labeled `old/stdin` and `new/stdin`.
0 commit comments