Skip to content

invalid byte sequence in UTF-8 on Win10 #717

@Antronin

Description

@Antronin

Below is the git log when I enable overcommit's pre_commit hook:

invalid byte sequence in UTF-8
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/utils/file_utils.rb:67:in `win32_symlink?'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/utils/file_utils.rb:27:in `symlink?'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/utils.rb:271:in `broken_symlink?'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/hook_context/pre_commit.rb:196:in `block in store_modified_times'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/hook_context/pre_commit.rb:195:in `each'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/hook_context/pre_commit.rb:195:in `store_modified_times'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/hook_context/pre_commit.rb:48:in `setup_environment'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/hook_runner.rb:42:in `block in run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/interrupt_handler.rb:86:in `isolate_from_interrupts'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/overcommit-0.53.0/lib/overcommit/hook_runner.rb:30:in `run'
.git/hooks/pre-commit:80:in `<main>'
Report this bug at https://github.com/sds/overcommit/issues

Because it is not mentioning any file name I'm not sure what exactly causes it. Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions