Error: Process completed with exit code 1.
Hi, sorry, but it is not clear to me. Is it possible to fix files using this action? Here is the action I'm currently using:
name: pre-commit
on:
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
- uses: stefanzweifel/git-auto-commit-action@v5
And config file looks as the following:
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.86.0
hooks:
- id: terraform_fmt
While I execute the pre-commit command with config hook locally it will fixe all findings, but this action only shows me which changes can be done and error at the end:
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
Terraform fmt............................................................Failed
- hook id: terraform_fmt
- files were modified by this hook
locals.tf
locals.tf
pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
diff --git a/live/aus/uat/locals.tf b/live/aus/uat/locals.tf
index 10826f3..1[62](https://github.com/connectsolutions/dominos-lms-iac/actions/runs/7844274183/job/21406251346#step:4:67)15b8 100[64](https://github.com/connectsolutions/dominos-lms-iac/actions/runs/7844274183/job/21406251346#step:4:69)4
--- a/live/aus/uat/locals.tf
+++ b/live/aus/uat/locals.tf
@@ -2,7 +2,7 @@ locals {
# general parameters
region = "ap-southeast-2"
- location = "aus"
+ location = "aus"
Error: Process completed with exit code 1.
What I'm doing wrong or the purpose of the action is only to show the findings?
please read the readme it addresses this question
Hi @asottile, I read it, but it is not clear to me. I would appreciate it if you could explain. Thanks in advance
no I will not do that. read it again if you don't understand