From 85dbdeaf09b1490ff4ae16c2e7c712410cb94191 Mon Sep 17 00:00:00 2001 From: Cody Oss Date: Fri, 3 Jan 2020 15:00:08 -0700 Subject: [PATCH] fix tests passing when they should not --- ci/check_go_generate.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/check_go_generate.sh b/ci/check_go_generate.sh index a0212e28..d906bd58 100755 --- a/ci/check_go_generate.sh +++ b/ci/check_go_generate.sh @@ -9,6 +9,7 @@ set -euo pipefail +BASE_DIR="$PWD" TEMP_DIR=$( mktemp -d ) function cleanup() { rm -rf "${TEMP_DIR}" @@ -16,8 +17,9 @@ function cleanup() { trap cleanup EXIT cp -r . "${TEMP_DIR}/" +cd $TEMP_DIR go generate ./... -if ! diff -r . "${TEMP_DIR}"; then +if ! diff -r . "${BASE_DIR}"; then echo echo "The generated files aren't up to date." echo "Update them with the 'go generate ./...' command."