Skip to content

Commit

Permalink
fix: correct downloading tools with Go 1.16+ (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 authored Nov 10, 2023
1 parent c66d03d commit 1f48caf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,9 @@ define go-get-tool
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
rm -rf $$TMP_DIR ;\
GOPATH="$$TMP_DIR" GOBIN="$$TMP_DIR/bin" go install $(2) ;\
cp -r "$$TMP_DIR/bin" "$(PROJECT_DIR)" ;\
chmod -R 777 "$$TMP_DIR" ; rm -rf "$$TMP_DIR" ;\
}
endef

0 comments on commit 1f48caf

Please sign in to comment.