From 19d983936ce49c19a5385a0d1ea2d8a36a7923a7 Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Fri, 21 Oct 2022 11:10:11 -0700 Subject: [PATCH] builds: fix "Killed" error with make dev (#15003) Previously, I would sometimes get Killed errors when executing the binary created by `make dev`. This is because we were using `cp` and OSX has a bug where it caches the old signature and so doesn't allow the new binary to run (see https://apple.stackexchange.com/a/428388) --- GNUmakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index ad5454991..cfa3191e5 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -149,7 +149,9 @@ dev: dev-build dev-build: mkdir -p bin CGO_ENABLED=0 go install -ldflags "$(GOLDFLAGS)" -tags "$(GOTAGS)" - cp -f ${MAIN_GOPATH}/bin/consul ./bin/consul + # rm needed due to signature caching (https://apple.stackexchange.com/a/428388) + rm -f ./bin/consul + cp ${MAIN_GOPATH}/bin/consul ./bin/consul dev-docker: linux @echo "Pulling consul container image - $(CONSUL_IMAGE_VERSION)"