Compare commits

...

2 Commits

Author SHA1 Message Date
2ec99a48d9 forgot import 2025-12-31 12:28:17 +13:00
278b7be4cb makes sure the hook is now executable 2025-12-31 12:27:50 +13:00

View File

@@ -1,5 +1,6 @@
import sys import sys
import os import os
import stat
from pathlib import Path from pathlib import Path
PYTHON_BIN = sys.executable PYTHON_BIN = sys.executable
@@ -21,3 +22,7 @@ with open(HOOK_PATH, "w") as txt:
f"{PYTHON_BIN} {HOOK_SCRIPT_PATH}\n" f"{PYTHON_BIN} {HOOK_SCRIPT_PATH}\n"
"exit 0\n" #make sure she closes "exit 0\n" #make sure she closes
]) ])
# make sure its executable
st = os.stat(HOOK_PATH)
os.chmod(HOOK_PATH, st.st_mode | stat.S_IEXEC)