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
{{ message }}
This repository was archived by the owner on Oct 19, 2023. It is now read-only.
Without any indication as to why, I suddenly started to get the following errors when I commit:
.git/hooks/pre-commit:40:in `split': invalid byte sequence in US-ASCII (ArgumentError)
from .git/hooks/pre-commit:40:in `block (2 levels) in <main>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:217:in `popen_run'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:99:in `popen3'
from .git/hooks/pre-commit:39:in `block in <main>'
from .git/hooks/pre-commit:28:in `each'
from .git/hooks/pre-commit:28:in `inject'
from .git/hooks/pre-commit:28:in `<main>'
(1)
If I then add # encoding: utf-8 to the top of the file, I get:
.git/hooks/pre-commit: line 12: require: command not found
.git/hooks/pre-commit: line 13: include: command not found
.git/hooks/pre-commit: line 16: syntax error near unexpected token `('
.git/hooks/pre-commit: line 16: `stop_on_warnings = (`git config --bool hooks.stop-on-warnings` != "false\n")'
(1)
I haven't changed anything in the script, it's exactly like the one here in the repository.
The text was updated successfully, but these errors were encountered:
Did you add the "encoding" line at the very first line? This is where the she-bang is supposed to be, and from the second error message, it looks like that broke the script.
I've committed an update to the script, could you try the updated version?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Without any indication as to why, I suddenly started to get the following errors when I commit:
If I then add
# encoding: utf-8
to the top of the file, I get:I haven't changed anything in the script, it's exactly like the one here in the repository.
The text was updated successfully, but these errors were encountered: