aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/minstall.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/minstall.py')
-rw-r--r--mesonbuild/minstall.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index e6e973a..d477718 100644
--- a/mesonbuild/minstall.py
+++ b/mesonbuild/minstall.py
@@ -437,11 +437,13 @@ class Installer:
self.log('Running custom install script {!r}'.format(name))
try:
rc = subprocess.call(script + args, env=child_env)
- if rc != 0:
- sys.exit(rc)
except OSError:
- print('Failed to run install script {!r}'.format(name))
- sys.exit(1)
+ print('FAILED: install script \'{}\' could not be run, stopped'.format(name))
+ # POSIX shells return 127 when a command could not be found
+ sys.exit(127)
+ if rc != 0:
+ print('FAILED: install script \'{}\' exit code {}, stopped'.format(name, rc))
+ sys.exit(rc)
def install_targets(self, d):
for t in d.targets: