Skip to content

Conversation

@LottR079
Copy link

@LottR079 LottR079 commented Dec 15, 2025

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 .nvmrc and warns or errors when mismatched or missing.

  • Scripts:
    • Add scripts/check-node-version.sh to compare node -v with .nvmrc.
      • Prints expected/current versions.
      • Exits with error if Node is unavailable; warns if versions differ.

Written by Cursor Bugbot for commit 08abe6e. This will update automatically on new commits. Configure here.

Added scripts/check-node-version.sh script, which compares the current version of Node.js with the version from .nvmrc.
@LottR079 LottR079 requested a review from a team as a code owner December 15, 2025 19:48
```bash
#!/usr/bin/env bash
set -euo pipefail
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

exit 1
fi

if [ "${CURRENT_VERSION}" = "${EXPECTED_VERSION}" ]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant