In case of error the lack of footer would fool gitlab log display into
thinking error summary from git-rebase was part of the collapsible section,
which is confusing to the reader.
Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
# collapsable header
printf "\e[0Ksection_start:$(date +%s):${FOOTER_ID}[collapsed=true]\r\e[0K\e[1;33m${COLLAPSED_TITLE}\e[1;0m\n"
+# collapsable footer, stopping traces first
+trap 'set +x; printf "\e[0Ksection_end:$(date +%s):${FOOTER_ID}\r\e[0K\n"' EXIT
+
# trace, but not outside of collapsed section
set -x
esac
fi
-# stop traces before closing collapsed section
-set +x
-# collapsable footer
-printf "\e[0Ksection_end:$(date +%s):${FOOTER_ID}\r\e[0K\n"
-
# make any ignored error visible outside of collapsed section
[ $IGNORED_ERROR = 0 ] || printf "\e[1;31mIgnoring failure for WIP commit\e[1;0m\n"