libkas: Detect error of init script

Do not swallow errors of the init script. Rather leave our wrapper
immediately and let run_cmd report the splash and terminate kas.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2017-07-28 16:29:44 +02:00 committed by Daniel Wagner
parent 39dba6fe75
commit eb284afb8e

View File

@ -278,7 +278,8 @@ def get_build_environ(config, build_dir):
get_bb_env_file = tempfile.mktemp()
with open(get_bb_env_file, 'w') as fds:
script = """#!/bin/bash
source %s $1 > /dev/null 2>&1
set -e
source %s $1 > /dev/null
env
""" % init_script
fds.write(script)