fix: address code review comments for installation scripts #9837
+21
−4
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.
This PR addresses 4 code review comments from PR #9835:
Fixed Issues
CLEANUP_FNM tracking: Now only marks fnm for cleanup if the directory didn't exist before installation, preventing accidental deletion of pre-existing fnm installations.
Unguarded $FNM_DIR: Added parameter substitution (${FNM_DIR:-}) to safely handle unset FNM_DIR variable with set -u.
npm prefix PATH persistence (PowerShell): Now persists user-local npm prefix to user PATH environment variable for future sessions.
fnm PATH persistence (PowerShell): Now persists fnm path to user PATH environment variable when using direct binary download method.
Changes
install.sh
$FNM_DIRwith${FNM_DIR:-}to prevent set -u errors$FNM_INSTALL_DIRexists before setting CLEANUP_FNM=trueinstall.ps1
[Environment]::SetEnvironmentVariable()for fnmThis task was co-authored by dallin and Continue.
Continue Tasks:▶️ 3 queued — View all
Summary by cubic
Make installation scripts safer and persist PATH changes on Windows. Prevents accidental fnm cleanup and avoids set -u errors in bash.
Written for commit 5b8d854. Summary will update on new commits.