mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-15 05:20:20 -06:00
Write files as utf8 more. Closes #85.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import contextlib
|
||||
import io
|
||||
import logging
|
||||
import time
|
||||
|
||||
@@ -28,7 +29,7 @@ def staged_files_only(cmd_runner):
|
||||
'Stashing unstaged files to {0}.'.format(patch_filename),
|
||||
)
|
||||
# Save the current unstaged changes as a patch
|
||||
with open(patch_filename, 'w') as patch_file:
|
||||
with io.open(patch_filename, 'w', encoding='utf-8') as patch_file:
|
||||
patch_file.write(diff_stdout)
|
||||
|
||||
# Clear the working directory of unstaged changes
|
||||
|
||||
Reference in New Issue
Block a user