Skip to content

Commit

Permalink
super good node-version-check
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Li committed May 29, 2020
1 parent c00bf13 commit d37d023
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ setup-git: ensure-venv setup-git-config
@echo ""

node-version-check:
@test "$$(node -v)" = v10.16.3 || (echo 'node version does not match 10.16.3. Recommended to use https://github.com/volta-cli/volta'; exit 1)
@# Checks to see if node's version matches the one specified in package.json for Volta.
@node -pe "process.exit(Number(!(process.version == 'v' + require('./package.json').volta.node )))" || \
(echo 'Unexpected node version. Recommended to use https://github.com/volta-cli/volta'; exit 1)

install-js-dev: node-version-check
@echo "--> Installing Yarn packages (for development)"
Expand Down

0 comments on commit d37d023

Please sign in to comment.