diff options
author | Jonathan Schwender <55576758+jschwe@users.noreply.github.com> | 2024-06-03 12:54:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 10:54:45 +0000 |
commit | 00b77ce73cc743c56551c43dbbe66362a5f9eb36 (patch) | |
tree | 720a5fa0f9da73d72f3f0c860e016eee7d8caf68 | |
parent | 2ca6c4b52be217d0c99986d0cb8a393571d195b7 (diff) | |
download | servo-00b77ce73cc743c56551c43dbbe66362a5f9eb36.tar.gz servo-00b77ce73cc743c56551c43dbbe66362a5f9eb36.zip |
mach: Read .servobuild as utf-8 (#32431)
Without this on my windows machine `open` seems to default
to the `gbk` codec, and then fails to read the file if it
contains Windows style paths (e.g. both `ndk = D:\my_path` or
`ndk = D:\\my_path` cause the `f.read()` to fail ).
-rw-r--r-- | python/servo/command_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 2ad49d1097d..fe4ed85cc83 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -273,7 +273,7 @@ class CommandBase(object): config_path = path.join(context.topdir, ".servobuild") if path.exists(config_path): - with open(config_path) as f: + with open(config_path, "r", encoding="utf-8") as f: self.config = toml.loads(f.read()) else: self.config = {} |