Skip to content

Conversation

@rymut
Copy link
Contributor

@rymut rymut commented Oct 29, 2021

Output of commands under windows is not UTF-8 by default, this
can lead to "invalid byte sequence in UTF-8" error on symlink check

Output of commands under windows is not UTF-8 by default, this
can lead to "invalid byte sequence in UTF-8" error on sylink check
@sds
Copy link
Owner

sds commented Nov 2, 2021

Thanks for the pull request, @rymut.

This currently breaks a large number of tests when running on Linux (which is what the vast majority of Overcommit users use).

      Failure/Error: ec = Encoding::Converter.new(Encoding.locale_charmap, 'UTF-8')
      Encoding::ConverterNotFoundError:                                                                                                                                                 code converter not found (UTF-8 to UTF-8)

If the issue is only reproducible when checking for bad symlinks, can we isolate this change to just change the encoding on the problematic line? Specifically:

win32_symlink?(result.stdout)

@rymut
Copy link
Contributor Author

rymut commented Nov 3, 2021

Thanks @sds: in my case only calling win32_symlink is reproducible - but the underlying problem will still be present.
My current commit should fix the issue with braking tests under linux - if the problems with the tests will be still persisting then I will isolate a change to win32_simlink.

Copy link
Owner

@sds sds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making the changes. Tests pass locally for me on macOS.

@sds sds merged commit 5fc63b9 into sds:master Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants