From cd41f4b41f5c57e1437d88b0367469ff1fd265e7 Mon Sep 17 00:00:00 2001 From: Steven Stallion Date: Sun, 23 Feb 2020 21:12:38 -0600 Subject: [PATCH] Fix incorrect traps in vunit --- bin/vunit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/vunit b/bin/vunit index 952b118..ec39cba 100755 --- a/bin/vunit +++ b/bin/vunit @@ -124,8 +124,8 @@ if [ $OUTPUT = FILE ]; then outfile=`mktemp -t vunit_results.XXXXXXXXXX` check_path "$outfile" trap - EXIT HUP INT QUIT TERM - trap 'rm -f "$outfile"; cd "$tcdir" exit 0' EXIT - trap 'rm -f "$outfile"; cd "$tcdir" exit 1' HUP INT QUIT TERM + trap 'rm -f "$outfile"; cd "$cwd"; exit 0' EXIT + trap 'rm -f "$outfile"; cd "$cwd"; exit 1' HUP INT QUIT TERM $VIM -c "UnitTest $tcfile >$outfile" -c "qall!"