Commit fbb2bd2b authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig) Committed by Pierre Schmitz
Browse files

Fix return code handling



Stop trap_exit from forcing a 0 exit code. This fixes makechrootpkg,
which used to always return success, even if the build failed.

Signed-off-by: default avatarPierre Schmitz <pierre@archlinux.de>
parent d5c6bc76
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ trap_abort() {

trap_exit() {
	trap - EXIT INT QUIT TERM HUP
	cleanup 0
	cleanup
}

die() {
+2 −1
Original line number Diff line number Diff line
@@ -160,7 +160,8 @@ copy_hostconf () {
}

trap_chroot_umount () {
	trap 'trap_exit' EXIT INT QUIT TERM HUP
	trap 'trap_abort' INT QUIT TERM HUP
	trap 'trap_exit' EXIT

	for cache_dir in ${cache_dirs[@]}; do
		umount "${working_dir}/${cache_dir}"
+2 −2

File changed.

Contains only whitespace changes.