From b1cffb4b09f59ed49311a95c9d0339e78305375c Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Tue, 29 Oct 2024 09:57:18 +0000 Subject: [PATCH] Revert "tests: Add trap statement in kata doc script" This reverts commit 093a6fd54218ae17ff1531e8e18fff96b6c17f13. as it is breaking the static checks Signed-off-by: stevenhorsman --- tests/kata-doc-to-script.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/kata-doc-to-script.sh b/tests/kata-doc-to-script.sh index 7ecce4efc..126073fd5 100755 --- a/tests/kata-doc-to-script.sh +++ b/tests/kata-doc-to-script.sh @@ -168,7 +168,6 @@ doc_to_script() all=$(mktemp) body=$(mktemp) - trap 'rm -f $body $all' EXIT cat "$file" |\ sed -n "/^ *${bash_block_open}/,/^ *${block_close}/ p" |\ @@ -189,6 +188,9 @@ doc_to_script() # create output file [ "$check_only" = "no" ] && cp "$all" "$outfile" + + # clean up + rm -f "$body" "$all" } main()