feat: remove inherently incorrect "hook launcher"

This commit is contained in:
ptrcnull 2024-07-27 20:00:59 +02:00
parent 419672b5e7
commit 8e9f1d80b4
2 changed files with 4 additions and 6 deletions

View file

@ -1,4 +0,0 @@
#!/usr/bin/env python3
from nyacme.hook import main
main()

View file

@ -3,6 +3,7 @@ import logging
import os.path import os.path
import shutil import shutil
import subprocess import subprocess
import sys
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
@ -51,8 +52,9 @@ def main() -> None:
hook_path = shutil.which('nyacme-hook') hook_path = shutil.which('nyacme-hook')
if not hook_path: if not hook_path:
log.warning('setting hook path to hook launcher from git repo') log.warning('nyacme-hook not found')
hook_path = os.path.join(os.path.dirname(__file__), '..', 'hook_launcher.py') log.warning('setting hook path to `python -m nyacme.hook` instead')
hook_path = f'{sys.executable} -m nyacme.hook'
res = subprocess.run([ res = subprocess.run([
'uacme', '-v', 'uacme', '-v',