Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Suddenly started to get errors when committing #7

Open
@NielsKSchjoedt

Description

@NielsKSchjoedt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions