aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/scripts/meson_install.py8
-rwxr-xr-xtest cases/common/60 install script/myinstall.sh2
2 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py
index 1ede757..7e43efd 100644
--- a/mesonbuild/scripts/meson_install.py
+++ b/mesonbuild/scripts/meson_install.py
@@ -125,7 +125,13 @@ def run_install_script(d):
final_command = commands + [script] + i.cmd_arr[1:]
else:
final_command = i.cmd_arr
- subprocess.check_call(final_command, env=child_env)
+ try:
+ rc = subprocess.call(final_command, env=child_env)
+ if rc != 0:
+ sys.exit(rc)
+ except Exception:
+ print('Failed to run install script:', i.cmd_arr[0])
+ sys.exit(1)
def is_elf_platform():
platname = platform.system().lower()
diff --git a/test cases/common/60 install script/myinstall.sh b/test cases/common/60 install script/myinstall.sh
index 4739dee..42a415e 100755
--- a/test cases/common/60 install script/myinstall.sh
+++ b/test cases/common/60 install script/myinstall.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+set -eu
+
echo Starting custom installation step
# These commands fail on Windows, but we don't really care.