Skip to content

Commit 8b7604d

Browse files
committed
Fixed check command
1 parent 192391c commit 8b7604d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ LANG := en
22
LANG_FILE := $(shell test -f LANGS.md.bak && echo LANGS.md.bak || echo LANGS.md)
33
LANG_DATA := $(shell grep "$(LANG)/" $(LANG_FILE))
44
LANG_NAME := $(shell echo "$(LANG_DATA)" | sed 's/.*\[\(.*\)\].*/\1/')
5+
NODE := $(shell which nodse 1> /dev/null && echo "true")
56

67
define ebook_support
78
@if which ebook-convert 1> /dev/null; then\
@@ -22,7 +23,7 @@ help:
2223
@echo " help - Display make command list."
2324
@echo " dev - Setup project and start the development server with debugging enabled."
2425
@echo " check - Check for root directory for various dependencies."
25-
@echo " setup - Setup the temporary language and install node dependencies for the development. Default is 'en'"
26+
@echo " setup - Setup the temporary language and install node dependencies for the development."
2627
@echo " build - Build the honkit project."
2728
@echo " build-dev - Build the honkit project with debug log."
2829
@echo " serve - Start honkit server locally for development."
@@ -31,11 +32,12 @@ help:
3132
@echo " mobi - Generate MOBI version of DjangoGirls tutorial."
3233
@echo " mode - Shows the development mode status."
3334
@echo " exit - Reset the project and exit development mode."
35+
@echo
3436

3537
check: package.json book.json LANGS.md
36-
@if ! which node 1> /dev/null; then\
37-
echo "Node.js not found. Please install/reinstall Node.js. NVM is recommended for installation(https://github.com/nvm-sh/nvm).";\
38-
fi
38+
ifeq ($(NODE),)
39+
$(error NodeJS not found. Please install/reinstall Node.js. NVM is recommended for installation(https://github.com/nvm-sh/nvm))
40+
endif
3941

4042
setup: check
4143
@if ! test -f "LANGS.md.bak"; then\

0 commit comments

Comments
 (0)