From 9dace5fc5e508e972389f41ef0fae6a96d29ec34 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 28 May 2016 23:14:34 +0300 Subject: [PATCH] Always initialise final_command. --- mesonbuild/scripts/meson_install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py index 1065d0a94..085dd6905 100644 --- a/mesonbuild/scripts/meson_install.py +++ b/mesonbuild/scripts/meson_install.py @@ -106,6 +106,7 @@ def run_install_script(d): child_env.update(env) for i in d.install_scripts: + final_command = i.cmd_arr script = i.cmd_arr[0] print('Running custom install script %s' % script) suffix = os.path.splitext(script)[1].lower() @@ -120,8 +121,6 @@ def run_install_script(d): if commands[0] is None: raise RuntimeError("Don't know how to run script %s." % script) final_command = commands + [script] + i.cmd_arr[1:] - else: - final_command = i.cmd_arr try: rc = subprocess.call(final_command, env=child_env) if rc != 0: