Closed dmitry-mightydevops closed 7 months ago
Hi
grep --version
cat /etc/os-release
We have grep
call which could cause that issue in the function that runs when you check the whole repo
The excluded pattern is the same for 14 of 17 hooks, so it's weird that you are the first who faces this problem from addition of that functional 24 months ago
@MaxymVlasov
β grep --version
grep (GNU grep) 3.8
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others; see
<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
β cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Workstation Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation
default_install_hook_types: ["pre-commit", "pre-push"]
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.86.0
hooks:
- id: terragrunt_fmt
stages: [commit,push]
- id: terragrunt_validate
stages: [push]
args:
- --args=--terragrunt-log-level=info
Reporoduced
Warning comes from https://github.com/antonbabenko/pre-commit-terraform/blob/8bcd633aaeaff836ac5cffa3a020c8ab678a6b54/hooks/_common.sh#L163
I suppose that's a grep
enhancement introduced in grep 3.8, because grep 3.7 does not show grep: warning: stray \ before /
This issue has been resolved in version 1.86.1 :tada:
Describe the bug
How can we reproduce it?
Environment information
.pre-commit-config.yaml
:file content
```bash - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.86.0 hooks: - id: terragrunt_fmt - id: terragrunt_validate stages: [commit] args: - --args=--terragrunt-log-level=info ```