return error code on exit status, if build failed

Signed-off-by: Kalle Lampila <kalle.lampila@ixonos.com>