From cca1ff05fdfae9dd73d21dac50baad83aa1891af Mon Sep 17 00:00:00 2001 From: benesjan Date: Tue, 2 Jan 2024 11:29:56 +0000 Subject: [PATCH] node version check --- yarn-project/bootstrap.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/yarn-project/bootstrap.sh b/yarn-project/bootstrap.sh index ff01dcb5e80..fcdf30c7b43 100755 --- a/yarn-project/bootstrap.sh +++ b/yarn-project/bootstrap.sh @@ -1,6 +1,17 @@ #!/usr/bin/env bash set -eu +# Check node version. +node_version=$(node -v | tr -d 'v') +major=${node_version%%.*} +rest=${node_version#*.} +minor=${rest%%.*} + +if (( major < 18 || ( major == 18 && minor < 19 ) )); then + echo "Node.js version is less than 18.19. Exiting." + exit 1 +fi + cd "$(dirname "$0")" CMD=${1:-}