Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ed06664

Browse files
committed
fix: add utf-8 encode when write toml file
1 parent 07d1b78 commit ed06664

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎commitizen/config/toml_config.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def set_key(self, key, value):
2727
parser = parse(f.read())
2828

2929
parser["tool"]["commitizen"][key] = value
30-
with open(self.path, "w") as f:
31-
f.write(parser.as_string())
30+
with open(self.path, "wb") as f:
31+
f.write(parser.as_string().encode("utf-8"))
3232
return self
3333

3434
def _parse_setting(self, data: Union[bytes, str]):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /