فهرست منبع

Fix "go tool cover" detection to only add -cover and -coverprofile if we both have cover support in Go, and if we have the cover tool downloaded

Tianon Gravi 11 سال پیش
والد
کامیت
eddda577a4
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      hack/make.sh

+ 4 - 1
hack/make.sh

@@ -66,7 +66,10 @@ LDFLAGS_STATIC='-X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode ext
 BUILDFLAGS='-tags netgo'
 
 HAVE_GO_TEST_COVER=
-if go help testflag | grep -q -- -cover; then
+if \
+	go help testflag | grep -q -- -cover \
+	&& go tool -n cover > /dev/null 2>&1 \
+; then
 	HAVE_GO_TEST_COVER=1
 fi