From 9867e267ea3aaab1a3b1e122793a76d2c24a3032 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Tue, 18 Mar 2025 07:25:46 -0400 Subject: [PATCH] fix(formatHeader.py): updated format header to ignore itself --- commit-config/hooks/formatHeader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commit-config/hooks/formatHeader.py b/commit-config/hooks/formatHeader.py index 8c303f9..64a0e86 100755 --- a/commit-config/hooks/formatHeader.py +++ b/commit-config/hooks/formatHeader.py @@ -120,6 +120,10 @@ if __name__ == "__main__": args = parser.parse_args() absPath = os.path.abspath(args.file) + fileName = os.path.basename(args.file) + if fileName == "formatHeader.py": + print(f"{BLUECOLOR}NOTE! Cannot format the formatHeader script{RESETCOLOR}") + exit(0) assert os.path.exists(absPath), f"{REDCOLOR}ERROR! The file {absPath} does not exist{RESETCOLOR}"