minstall: Print a big FAILED when a script fails
We don't run any further scripts when this happens, so we need to
print a big error. The exit code was already correct.
Fixes
@@ -437,11 +437,13 @@ class Installer:
self.log('Running custom install script {!r}'.format(name))
try:
rc = subprocess.call(script + args, env=child_env)
+ except OSError:
+ 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)
- except OSError:
- print('Failed to run install script {!r}'.format(name))
- sys.exit(1)
def install_targets(self, d):
for t in d.targets:
