Skip to content

Commit 9b8ffa1

Browse files
authored
Output node min version variable (#15562)
1 parent d85a4e8 commit 9b8ffa1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,10 @@ git-check:
210210
.PHONY: node-check
211211
node-check:
212212
$(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | cut -c2- | tr '.' ' ');))
213+
$(eval MIN_NODE_VER_FMT := $(shell printf "%g.%g.%g" $(shell echo $(MIN_NODE_VERSION) | grep -o ...)))
213214
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
214215
@if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" -o "$(NPM_MISSING)" = "1" ]; then \
215-
echo "Gitea requires Node.js 10 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
216+
echo "Gitea requires Node.js $(MIN_NODE_VER_FMT) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
216217
exit 1; \
217218
fi
218219

0 commit comments

Comments
 (0)