File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -3657,26 +3657,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
36573657 name = "terraform-format" ;
36583658 description = "Format Terraform (`.tf`) files." ;
36593659 package = tools . opentofu ;
3660- entry =
3661- let
3662- terraform-fmt = pkgs . writeScriptBin "terraform-fmt" ''
3663- #!/usr/bin/env bash
3664-
3665- set -euo pipefail
3666-
3667- print_help() {
3668- echo "Run '$1 fmt -recursive' to format the code"
3669- exit 1
3670- }
3671-
3672- if [ -f "${ hooks . terraform-format . package } /bin/tofu" ]; then
3673- ${ hooks . terraform-format . package } /bin/tofu fmt -check -diff "$@" || print_help "tofu"
3674- else
3675- ${ hooks . terraform-format . package } /bin/terraform fmt -check -diff "$@" || print_help "terraform"
3676- fi
3677- '' ;
3678- in
3679- "${ terraform-fmt } /bin/terraform-fmt" ;
3660+ entry = "${ lib . getExe hooks . terraform-format . package } fmt -check -diff" ;
36803661 files = "\\ .tf$" ;
36813662 } ;
36823663 terraform-validate =
You can’t perform that action at this time.
0 commit comments