From 4848c8d24cb3d790838bebb06450962939dd082b Mon Sep 17 00:00:00 2001 From: Ruben ten Hove Date: Mon, 4 Jul 2022 22:30:03 +0000 Subject: use env as base --- .custom-format.py | 4 ++-- 1 file 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.") -- cgit 1.4.1