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 928aa30

Browse files
authored
Merge pull request #356 from 7kachika/master
fix: add utf-8 encode when write toml file
2 parents 07d1b78 + ed06664 commit 928aa30

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 によって変換されたページ (->オリジナル) /