From b72abe1164915700a68765ba395a932dd81ec179 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 4 Jan 2025 21:11:20 +0200
Subject: [PATCH] Fix for the Terraform validate hook.

Check for the right CLI.
---
 hooks/terraform_validate.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hooks/terraform_validate.py b/hooks/terraform_validate.py
index 60fbb50..5107b5e 100644
--- a/hooks/terraform_validate.py
+++ b/hooks/terraform_validate.py
@@ -36,7 +36,7 @@ def main():
     parser = argparse.ArgumentParser(description=__doc__)
     parser.add_argument("file", nargs="+", type=pathlib.Path)
     args = parser.parse_args()
-    hooks.utils.check_executable("terraform")
+    hooks.utils.check_executable(TF_CLI)
     os.putenv("TF_INPUT", "0")
     os.putenv("TF_IN_AUTOMATION", "1")
     return hooks.utils.bulk_check(
-- 
GitLab