File tree 1 file changed +1
-20
lines changed
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
3657
3657
name = "terraform-format" ;
3658
3658
description = "Format Terraform (`.tf`) files." ;
3659
3659
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" ;
3680
3661
files = "\\ .tf$" ;
3681
3662
} ;
3682
3663
terraform-validate =
You can’t perform that action at this time.
0 commit comments