diff --git a/Makefile b/Makefile index 7a04072964ee5..9a457c619ad49 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,9 @@ GO_SRC_FILES := $(shell find . $(FIND_EXCLUSIONS) -type f -name '*.go' -not -nam # All the shell files in the repo, excluding ignored files. SHELL_SRC_FILES := $(shell find . $(FIND_EXCLUSIONS) -type f -name '*.sh') +# Ensure we don't use the user's git configs which might cause side-effects +GIT_FLAGS = GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null + # All ${OS}_${ARCH} combos we build for. Windows binaries have the .exe suffix. OS_ARCHES := \ linux_amd64 linux_arm64 linux_armv7 \ @@ -739,7 +742,7 @@ site/.eslintignore site/.prettierignore: .prettierignore Makefile done < "$<" test: - gotestsum --format standard-quiet -- -v -short -count=1 ./... + $(GIT_FLAGS) gotestsum --format standard-quiet -- -v -short -count=1 ./... .PHONY: test # sqlc-cloud-is-setup will fail if no SQLc auth token is set. Use this as a @@ -775,7 +778,7 @@ sqlc-vet: test-postgres-docker test-postgres: test-postgres-docker # The postgres test is prone to failure, so we limit parallelism for # more consistent execution. - DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum \ + $(GIT_FLAGS) DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum \ --junitfile="gotests.xml" \ --jsonfile="gotests.json" \ --packages="./..." -- \ @@ -824,7 +827,7 @@ test-postgres-docker: # Make sure to keep this in sync with test-go-race from .github/workflows/ci.yaml. test-race: - gotestsum --junitfile="gotests.xml" -- -race -count=1 ./... + $(GIT_FLAGS) gotestsum --junitfile="gotests.xml" -- -race -count=1 ./... .PHONY: test-race test-tailnet-integration: