fix: clean up coverage script temp file

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
This commit is contained in:
Terry Howe
2025-10-10 09:33:13 -06:00
parent 4877e2d7e9
commit 235988c906

View File

@@ -18,6 +18,7 @@ set -euo pipefail
covermode=${COVERMODE:-atomic}
coverdir=$(mktemp -d /tmp/coverage.XXXXXXXXXX)
trap 'rm -rf "${coverdir}"' EXIT
profile="${coverdir}/cover.out"
html=false
target="./..." # by default the whole repository is tested
@@ -47,7 +48,7 @@ generate_cover_data() {
generate_cover_data
go tool cover -func "${profile}"
if [ "${html}" == "true" ] ; then
if [ "${html}" = "true" ] ; then
go tool cover -html "${profile}"
fi