diff options
-rw-r--r-- | mesonbuild/scripts/meson_install.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py index 07fb83b..1065d0a 100644 --- a/mesonbuild/scripts/meson_install.py +++ b/mesonbuild/scripts/meson_install.py @@ -110,7 +110,7 @@ def run_install_script(d): print('Running custom install script %s' % script) suffix = os.path.splitext(script)[1].lower() if platform.system().lower() == 'windows' and suffix != '.bat': - first_line = open(script).readline().strip() + first_line = open(script, encoding='latin_1', errors='ignore').readline().strip() if first_line.startswith('#!'): if shutil.which(first_line[2:]): commands = [first_line[2:]] @@ -118,7 +118,6 @@ def run_install_script(d): commands = first_line[2:].split('#')[0].strip().split() commands[0] = shutil.which(commands[0].split('/')[-1]) if commands[0] is None: - commands raise RuntimeError("Don't know how to run script %s." % script) final_command = commands + [script] + i.cmd_arr[1:] else: |