diff --git a/main.py b/main.py index 98e4fe3..f47566b 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,6 @@ import re import subprocess +import sys def clang_format(file_path): @@ -9,6 +10,9 @@ def clang_format(file_path): command, stderr=subprocess.STDOUT, text=True) except subprocess.CalledProcessError as e: output = e.output + except FileNotFoundError as e: + print(f"Command not found: {e.filename}", file=sys.stderr) + exit(1) return output