autohooks
autohooks copied to clipboard
Windows Problem
poetry run autohooks activate
not working, giving KeyError
PWD and after setting it manually, it's not performing any autohooks task as define in pyproject.toml.
Could you please paste the full traceback? Without the traceback we can't debug this issue any further.
Please check attached images
After setting it manually
set PWD=<project_dir>
hooks setup completed but 'git commit' not working.
It seems below code is not for windows environment, I add another except for FileNotFoundError to let activiate passed, but when I commit code, pre-commit complaint python was not found.
def is_split_env():
try:
subprocess.run(
shlex.split("/usr/bin/env -S echo True"),
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True,
check=True,
)
is_split = True
except subprocess.CalledProcessError:
is_split = False
except FileNotFoundError:
is_split = False
return is_split
@An-Li-magicloud could you please create a new issue for your problem and provide a complete traceback? Your issue is completely unrelated. The original issue has been fixed with https://github.com/greenbone/autohooks/pull/165 already a long time ago.