-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't crash on non-unicode files #5
Comments
Easiest option: silently ignore files that cannot be treated as UTF-8 (maybe showing a warning). But what if users want to run this against files with different encodings? For the moment I'll leave them to convert those files themselves, future releases might add some kind of supported encoding option. |
Easy way to replicate this problem in the python -m pip install build
python -m build
files-to-prompt . It crashes on the binary wheel that was built and dropped into |
Took a few follow-ups:
https://gist.github.com/simonw/9b83f42a1b87d3fcb3b4b8e6f482af38 Then to get it to write the tests:
https://gist.github.com/simonw/511e1dbede6aba25b2d7027c55cdf759 The test it added failed, because it turned out it had tried writing a binary string |
Got this error running against a folder with a binary in it.
The text was updated successfully, but these errors were encountered: