-
Notifications
You must be signed in to change notification settings - Fork 478
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Binary output written to console #217
Comments
This isn't supposed to happen. There's a check for whether a file is binary or not before printing the diff. Obviously it's not working. What are the contents of the binary file that's getting printed? A hex dump of the first 512 bytes should be enough for reproducing this bug. |
Relevant commit is f2dfbb8#diff-8e160c67b78164a82112c7af4beb91fe. |
Oh, I see you're already thought of this! Cool :-) The files in question were fonts -- Inconsolata Regular and Bold taken from https://fonts.google.com/specimen/Inconsolata. |
I tried running So I don't know why the font was shown in the terminal. |
Thanks very much for doing the further investigation. I'll close this for now until we can reproduce the problem. |
If you track binary files with Chezmoi, you will see binary output in the termianl when using
chezmoi update -v
.I suggest checking if the files contain a NUL byte before printing them to the terminal. That heuristic normally works okay to determine if a file is "binary" or not.
The text was updated successfully, but these errors were encountered: