diff --git a/Makefile.common b/Makefile.common index 3c8cca72ac575..3224faed8578f 100644 --- a/Makefile.common +++ b/Makefile.common @@ -67,7 +67,7 @@ LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitBranch=$(shell gi LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBEdition=$(TIDB_EDITION)" EXTENSION_FLAG = -ifeq ($(shell if [ -d extension/enterprise/.git ]; then echo "true"; fi),true) +ifeq ($(shell if [ -f extension/enterprise/.git ]; then echo "true"; fi),true) EXTENSION_FLAG += -X "github.com/pingcap/tidb/util/versioninfo.TiDBEnterpriseExtensionGitHash=$(shell cd extension/enterprise && git rev-parse HEAD)" endif