aboutsummaryrefslogtreecommitdiff
path: root/.custom-format.py
diff options
context:
space:
mode:
authorRuben ten Hove <git@rhtenhove.nl>2022-07-04 22:30:03 +0000
committerRuben ten Hove <git@rhtenhove.nl>2022-07-04 22:30:03 +0000
commit4848c8d24cb3d790838bebb06450962939dd082b (patch)
tree7d71d41b0983fb0eb9b91b523b2cecc57f31226d /.custom-format.py
parent250000ee79c87476d81d0869e5d2c3435f224ed9 (diff)
downloadAFLplusplus-4848c8d24cb3d790838bebb06450962939dd082b.tar.gz
use env as base
Diffstat (limited to '.custom-format.py')
-rwxr-xr-x.custom-format.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/.custom-format.py b/.custom-format.py
index 75dbda79..f9301585 100755
--- a/.custom-format.py
+++ b/.custom-format.py
@@ -26,11 +26,11 @@ import shutil
with open(".clang-format") as f:
fmt = f.read()
-CURRENT_LLVM = 14
+CURRENT_LLVM = os.getenv('LLVM_VERSION', 14)
CLANG_FORMAT_BIN = os.getenv("CLANG_FORMAT_BIN")
if shutil.which(CLANG_FORMAT_BIN) is None:
- CLANG_FORMAT_BIN = f"clang-format-{os.getenv('LLVM_VERSION', CURRENT_LLVM)}"
+ CLANG_FORMAT_BIN = f"clang-format-{CURRENT_LLVM}"
if shutil.which(CLANG_FORMAT_BIN) is None:
print(f"[!] clang-format-{CURRENT_LLVM} is needed. Aborted.")