We created a pre-commit hook for our project. But when we ran that pre-commit on Windows, we got an error:
Check copyright notices...................................................................Failed
- hook id: check-copyright
- exit code: 1
Executable `C:Userstore.cachepre-commitrepoq2jv0lxhpy_env-python3.9Scriptspython.EXE` not found
So, pre-commit lose slashes for Windows machine. How to fix it? In pre-commit script we have #!/usr/bin/env python
shebang, could it be a problem with that?
For Unix-systems everything is ok
.pre-commit-config.yaml
- repo: https://github.com/espressif/check-copyright/
rev: v1.0.0
hooks:
- id: check-copyright
args: ['--ignore', 'tools/ci/check_copyright_ignore.txt', '--config', 'tools/ci/check_copyright_config.yaml']
.pre-commit-hooks.yaml:
- id: check-copyright
name: Check copyright notices
entry: check_copyright.py --verbose --replace
language: python
files: \.(py|c|h|cpp|hpp|ld|s|S)$
require_serial: true
Full repository: https://github.com/espressif/check-copyright