Conversation
Added scripts/check-node-version.sh script, which compares the current version of Node.js with the version from .nvmrc.
| ```bash | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| ``` |
There was a problem hiding this comment.
Bug: Markdown code fences break shell script execution
The script contains markdown code fence markers (```bash on line 1 and ``` on line 4) that are not valid bash syntax. This causes the script to fail on execution since the shebang must be on line 1, and ```bash will be interpreted as an invalid command. The markdown formatting was likely accidentally included when creating the file.
| exit 1 | ||
| fi | ||
|
|
||
| if [ "${CURRENT_VERSION}" = "${EXPECTED_VERSION}" ]; then |
There was a problem hiding this comment.
Bug: Version comparison fails for nvm aliases like lts/*
The exact string comparison between CURRENT_VERSION (from node -v, e.g., v20.10.0) and EXPECTED_VERSION (from .nvmrc) will never succeed when .nvmrc contains an nvm alias like lts/*. Since the repository's .nvmrc actually contains lts/*, this script will always report a version mismatch even when the correct Node version is installed, making it ineffective for its intended purpose.
Added scripts/check-node-version.sh script, which compares the current version of Node.js with the version from .nvmrc.
Note
Add a script that compares the current Node.js version to
.nvmrcand warns or errors when mismatched or missing.scripts/check-node-version.shto comparenode -vwith.nvmrc.Written by Cursor Bugbot for commit 08abe6e. This will update automatically on new commits. Configure here.