From e603d3eeb18369b528573d956318762ce325d687 Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Sun, 16 Jan 2022 21:05:57 +0100 Subject: [PATCH] repro: Ensure we actually remove the created directories on abort Signed-off-by: Morten Linderud --- repro.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repro.in b/repro.in index 7d75b0a..534cef9 100755 --- a/repro.in +++ b/repro.in @@ -239,7 +239,6 @@ function remove_snapshot (){ # 1: name of container function create_snapshot (){ local build="$1" - trap "{ remove_snapshot \"$build\" ; exit 1; }" ERR INT msg2 "Create snapshot for $build..." mkdir -p "${BUILDDIRECTORY}/${build}/startdir" touch "$BUILDDIRECTORY/$build" @@ -367,6 +366,7 @@ function cmd_check(){ msg "Starting build..." local build="${pkgbase}_$$" create_snapshot "$build" 0 + trap "{ remove_snapshot \"$build\" ; exit 1; }" ERR INT local build_root_dir="$BUILDDIRECTORY/${build}"