Arrêt du processus en cas d'erreur
This commit is contained in:
parent
6d5e898cb8
commit
d99305182e
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
${TAMARIN_ACBUILD} environment add DEBIAN_FRONTEND noninteractive
|
${TAMARIN_ACBUILD} environment add DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
if [ "${TAMARIN_ACBUILD_ENGINE}" == 'chroot' ]; then
|
if [ "${TAMARIN_ACBUILD_ENGINE}" == 'chroot' ]; then
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
${TAMARIN_ACBUILD} environment add DEBIAN_FRONTEND noninteractive
|
${TAMARIN_ACBUILD} environment add DEBIAN_FRONTEND noninteractive
|
||||||
sudo -E /usr/bin/env bash - <<EOF
|
sudo -E /usr/bin/env bash - <<EOF
|
||||||
export PATH=${PATH}
|
export PATH=${PATH}
|
||||||
|
|
|
@ -9,7 +9,7 @@ def run(args, as_root = False, capture_output=False, debug=False):
|
||||||
if capture_output:
|
if capture_output:
|
||||||
return subprocess.check_output(cmd, stdin=subprocess.PIPE)
|
return subprocess.check_output(cmd, stdin=subprocess.PIPE)
|
||||||
else:
|
else:
|
||||||
return subprocess.call(cmd, stdin=subprocess.PIPE)
|
return subprocess.check_call(cmd, stdin=subprocess.PIPE)
|
||||||
|
|
||||||
def get_images_list(rkt_flags = [], debug=False):
|
def get_images_list(rkt_flags = [], debug=False):
|
||||||
output = run([
|
output = run([
|
||||||
|
|
|
@ -12,9 +12,7 @@ def run_profile_hooks(profile, step, cwd=None, env=None, debug=False):
|
||||||
if not trimmed_hook_name:
|
if not trimmed_hook_name:
|
||||||
continue
|
continue
|
||||||
hook_path = os.path.join(hooks_dir, trimmed_hook_name)
|
hook_path = os.path.join(hooks_dir, trimmed_hook_name)
|
||||||
code = subprocess.call(hook_path, cwd=cwd, stdin=subprocess.PIPE, env=env)
|
code = subprocess.check_call(hook_path, cwd=cwd, stdin=subprocess.PIPE, env=env)
|
||||||
if code != 0:
|
|
||||||
raise Exception("Hook '{:s}' exited with a non zero code ({:d}) !".format(trimmed_hook_name, code))
|
|
||||||
|
|
||||||
def get_hooks_dir():
|
def get_hooks_dir():
|
||||||
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../hooks")
|
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../hooks")
|
||||||
|
@ -86,4 +84,4 @@ def run_acbuild(args, captureOutput=False, as_root=False, debug=False):
|
||||||
if captureOutput:
|
if captureOutput:
|
||||||
return subprocess.check_output(cmd, stdin=subprocess.PIPE)
|
return subprocess.check_output(cmd, stdin=subprocess.PIPE)
|
||||||
else:
|
else:
|
||||||
return subprocess.call(cmd, stdin=subprocess.PIPE)
|
return subprocess.check_call(cmd, stdin=subprocess.PIPE)
|
||||||
|
|
Loading…
Reference in New Issue