You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like pre-commit tries to read the contents of an already installed hook blindly, without first checking if its a text file and not binary blob.
version information
pre-commit version: 2.13.0
sys.version:
3.8.5 (default, May 27 2021, 13:30:53)
[GCC 9.3.0]
sys.executable: /usr/bin/python3
os.name: posix
sys.platform: linux
error information
An unexpected error has occurred: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 40: invalid continuation byte
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/pre_commit/error_handler.py", line 65, in error_handler
yield
File "/home/user/.local/lib/python3.8/site-packages/pre_commit/main.py", line 367, in main
return install(
File "/home/user/.local/lib/python3.8/site-packages/pre_commit/commands/install_uninstall.py", line 139, in install
_install_hook_script(
File "/home/user/.local/lib/python3.8/site-packages/pre_commit/commands/install_uninstall.py", line 88, in _install_hook_script
if os.path.lexists(hook_path) and not is_our_script(hook_path):
File "/home/user/.local/lib/python3.8/site-packages/pre_commit/commands/install_uninstall.py", line 52, in is_our_script
contents = f.read()
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 40: invalid continuation byte
The text was updated successfully, but these errors were encountered:
It looks like pre-commit tries to read the contents of an already installed hook blindly, without first checking if its a text file and not binary blob.
version information
error information
The text was updated successfully, but these errors were encountered: