Skip to content

Commit ee39ea7

Browse files
committed
Specify encoding when writing file
1 parent c80344c commit ee39ea7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Tools/build/generate-build-details.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,9 @@ def main() -> None:
207207
make_paths_relative(data, args.config_file_path)
208208

209209
json_output = json.dumps(data, indent=2)
210-
with open(args.location, 'w') as f:
211-
print(json_output, file=f)
210+
with open(args.location, 'w', encoding='utf-8') as f:
211+
f.write(json_output)
212+
f.write('\n')
212213

213214

214215
if __name__ == '__main__':

0 commit comments

Comments
 (0)