build: Propagate non-zero exit status when running in a tty
Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
6ada99e40d
commit
3ba7091251
@ -133,6 +133,9 @@ class BuildCommand(Command):
|
|||||||
+ ctx.config.get_bitbake_targets())
|
+ ctx.config.get_bitbake_targets())
|
||||||
if sys.stdout.isatty():
|
if sys.stdout.isatty():
|
||||||
logging.info('%s$ %s', ctx.build_dir, ' '.join(cmd))
|
logging.info('%s$ %s', ctx.build_dir, ' '.join(cmd))
|
||||||
subprocess.call(cmd, env=ctx.environ, cwd=ctx.build_dir)
|
ret = subprocess.call(cmd, env=ctx.environ, cwd=ctx.build_dir)
|
||||||
|
if ret != 0:
|
||||||
|
logging.error('Command returned non-zero exit status %d', ret)
|
||||||
|
sys.exit(ret)
|
||||||
else:
|
else:
|
||||||
run_cmd(cmd, cwd=ctx.build_dir)
|
run_cmd(cmd, cwd=ctx.build_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user