diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-22 22:59:16 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-29 11:28:08 +0200 |
commit | 3e396b3782813d36d46195564cd0e111422bcaf5 (patch) | |
tree | f315e990f71984745fcb8f22dac2f0e400fecadb /ci | |
parent | 28175bbee2c111cf41b80c97bbadd7dbabaa8990 (diff) | |
download | meson-3e396b3782813d36d46195564cd0e111422bcaf5.zip meson-3e396b3782813d36d46195564cd0e111422bcaf5.tar.gz meson-3e396b3782813d36d46195564cd0e111422bcaf5.tar.bz2 |
fix: Always explicitly set encoding for text files (fixes #8263)
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/ciimage/build.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ci/ciimage/build.py b/ci/ciimage/build.py index dcc11a9..2cf0736 100755 --- a/ci/ciimage/build.py +++ b/ci/ciimage/build.py @@ -18,7 +18,7 @@ install_script = 'install.sh' class ImageDef: def __init__(self, image_dir: Path) -> None: path = image_dir / image_def_file - data = json.loads(path.read_text()) + data = json.loads(path.read_text(encoding='utf-8')) assert isinstance(data, dict) assert all([x in data for x in ['base_image', 'env']]) @@ -74,7 +74,7 @@ class Builder(BuilderBase): # Also add /ci to PATH out_data += 'export PATH="/ci:$PATH"\n' - out_file.write_text(out_data) + out_file.write_text(out_data, encoding='utf-8') # make it executable mode = out_file.stat().st_mode @@ -91,7 +91,7 @@ class Builder(BuilderBase): RUN /ci/install.sh ''') - out_file.write_text(out_data) + out_file.write_text(out_data, encoding='utf-8') def do_build(self) -> None: # copy files @@ -131,7 +131,7 @@ class ImageTester(BuilderBase): ADD meson /meson ''') - out_file.write_text(out_data) + out_file.write_text(out_data, encoding='utf-8') def copy_meson(self) -> None: shutil.copytree( |