feat: ensure correct nodejs version is installed #3691
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2526
Summary
correct nodejs version
This PR addresses an issue where the script did not check if the currently installed Node.js version matches the required version.
If Node.js was already installed but with a different version, the script would not update it to the required version.
I have written logic to check if the Node version is
exactly a specific version
, not just above a certain version. Let me know if you find anything wrong with this!pyenv enviornment check
The part of setting environment variables was refactored into a function and generalized for future reuse!
(add "config/fish/config.fish" for fish shell user too!)
I also eliminated the possibility of duplicating the script_content by using grep.
and I considered a case where pyenv is installed but the environment variables are not set.
Checklist: