Skip to content

Commit 59feedf

Browse files
committed
chore(release): specify utf-8 encoding for file operations
1 parent d4fc2aa commit 59feedf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/tools/private/release/promote_rc_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_promote_rc_writes_github_output(self):
8383
# Assert
8484
self.assertEqual(result, 0)
8585
self.assertTrue(os.path.exists(github_output_path))
86-
content = Path(github_output_path).read_text()
86+
content = Path(github_output_path).read_text(encoding="utf-8")
8787
self.assertEqual(content, "version=2.0.0\n")
8888

8989
def test_promote_rc_resolve_issue_success(self):

tools/private/release/promote_rc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def run(self) -> int:
158158
self.git.push(args.remote, version)
159159

160160
if github_output := os.environ.get("GITHUB_OUTPUT"):
161-
with open(github_output, "a") as f:
161+
with open(github_output, "a", encoding="utf-8") as f:
162162
f.write(f"version={version}\n")
163163

164164
print(f"Updating tracking issue #{issue_num} checklist...")

0 commit comments

Comments
 (0)