fix(windows): fixed windows output. colorama was converting to cp1252

This commit is contained in:
Christopher Pickering 2022-05-18 10:31:19 -05:00
parent f63cc4d8ea
commit 46395e28bc
No known key found for this signature in database
GPG key ID: E14DB3B0A0FACF84

View file

@ -228,7 +228,8 @@ def main(
if temp_file and (config.reformat or config.check):
# if using stdin, only give back formatted code.
echo(Path(temp_file.name).read_text(encoding="utf8").rstrip())
echo(Path(temp_file.name).read_text(encoding="utf8").rstrip().encode('utf8'))
if temp_file:
temp_file.close()