Only copy hooks if building from a git repo

Fixes #3498
This commit is contained in:
Jeff Mitchell
2017-10-27 13:11:02 -04:00
parent 6cfdd7b40c
commit ed1cbb0a78

View File

@@ -69,7 +69,7 @@ vet:
prep: fmtcheck
@sh -c "'$(CURDIR)/scripts/goversioncheck.sh' '$(GO_VERSION_MIN)'"
go generate $(go list ./... | grep -v /vendor/)
cp .hooks/* .git/hooks/
@if [ -d .git/hooks ]; then cp .hooks/* .git/hooks/; fi
# bootstrap the build by downloading additional tools
bootstrap: