Skip to content

mapfile: command not found in zsh #626

@LeonKalt

Description

@LeonKalt

Describe the bug

When running the hooks locally in a zsh mapfile is not available this breaks all hooks loading the new _common.sh

How can we reproduce it?

    - repo: https://github.com/antonbabenko/pre-commit-terraform
      rev: v1.87.0
      hooks:
        - id: terraform_fmt

run in zsh

Environment information

  • OS: MacOS Apple Silicon
  • uname -a and/or systeminfo | Select-String "^OS" output:
Darwin MAC 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64
  • Tools availability and versions:
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23)
pre-commit 3.6.0
Terraform v1.7.1
Python 3.11.7
Python 3.11.7
checkov 3.2.0
infracost SKIPPED
terraform-docs SKIPPED
terragrunt version 0.55.1
terrascan SKIPPED
TFLint version 0.50.3
+ ruleset.terraform (0.5.0-bundled)
tfsec SKIPPED
trivy Version: 0.49.1
Vulnerability DB:
  Version: 2
  UpdatedAt: 2022-06-24 06:06:57.585311457 +0000 UTC
  NextUpdate: 2022-06-24 12:06:57.585311157 +0000 UTC
  DownloadedAt: 2022-06-24 08:02:01.406102 +0000 UTC
tfupdate SKIPPED
hcledit SKIPPED
flock SKIPPED
  • .pre-commit-config.yaml:
file content
    - repo: https://github.com/antonbabenko/pre-commit-terraform
      rev: v1.87.0
      hooks:
        - id: terraform_fmt

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions