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 /mesonbuild/msetup.py | |
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 'mesonbuild/msetup.py')
-rw-r--r-- | mesonbuild/msetup.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index b348948..9ed2981 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -148,9 +148,9 @@ class MesonApp: def add_vcs_ignore_files(self, build_dir: str) -> None: if os.listdir(build_dir): return - with open(os.path.join(build_dir, '.gitignore'), 'w') as ofile: + with open(os.path.join(build_dir, '.gitignore'), 'w', encoding='utf-8') as ofile: ofile.write(git_ignore_file) - with open(os.path.join(build_dir, '.hgignore'), 'w') as ofile: + with open(os.path.join(build_dir, '.hgignore'), 'w', encoding='utf-8') as ofile: ofile.write(hg_ignore_file) def validate_dirs(self, dir1: str, dir2: str, reconfigure: bool, wipe: bool) -> T.Tuple[str, str]: |