Repository navigation
[Fix] nvm_err, nvm_err_with_colors: do not fail when stderr is closed - #3907
Merged
Merged
Conversation
lazerg
force-pushed
the
fix/nvm-err-closed-stderr
branch
from
August 25, 2026 17:52
8658bbc to
64f29cf
Compare
ljharb
force-pushed
the
fix/nvm-err-closed-stderr
branch
from
September 4, 2026 05:57
64f29cf to
b0db1fb
Compare
ljharb
approved these changes
Sep 4, 2026
ljharb
force-pushed
the
fix/nvm-err-closed-stderr
branch
from
September 4, 2026 21:10
b0db1fb to
ccb49e5
Compare
ljharb
added a commit
that referenced
this pull request
Sep 21, 2026
Bug Fixes - `nvm_alias`, `nvm_version_path`: reject `..` path components - `nvm_get_make_jobs`: count cores on platforms the `case` does not name - `nvm-exec`: improve the no-version failure message - `nvm use`: do not clobber `man`'s default search path (#3890) - `nvm_err`, `nvm_err_with_colors`: do not fail when stderr is closed (#3907) - `nvm_hash_reset`: only run `hash -r` where the shell supports it - `nvm_alias`: unset zsh's `extendedglob` while reading an alias file (#3891) - zsh: restore `nomatch` and `markdirs` rather than clobbering them - `nvm --help`: render the set-colors legend in color (#3915) - `nvm unload`: drop the undefined `nvm_format_help_message_colors` - `nvm_get_mirror`: allow ports, userinfo, IPv6 hosts, and percent-encoding - `nvm_sanitize_auth_header`: allow `~`, completing RFC 7235 `token68` (#3751) Refactors - `nvm --help`: extract the set-colors legend into `nvm_print_color_legend` Performance - Optimize nvm_tree_contains_path with in-memory POSIX parent-walk (#3912) Docs - [readme] document platforms with no official node binaries - `install.sh`: Fix missing words in bash/zsh completion message (#3887) - Remove stray closing HTML tag (#3919) Misc - [meta] remove CLAUDE.md symlink in favor of AGENTS.md (#3928) - [meta] add `release-notes.sh`, the release notes generator Tests - homebrew/actions changed their default branch - [actions] WSL: pin every distribution, and test the newest of each line - `nvm_print_color_legend`: look up the function with `PATH` emptied - `nvm_print_color_legend`: check for the function, not a same-named file - `nvm_print_color_legend`: fix the `fast` suite on GNU userlands - [actions] `release.yml`: provide `GH_TOKEN` so release-notes PR lookup can run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When a caller closes stderr instead of redirecting it to
/dev/null, which Ruby'sIO.popen(..., err: :close)and similar APIs do, the>&2redirection innvm_errfails, sonvm_errreturns non-zero.nvm_compare_checksumends withnvm_err 'Checksums matched!', so a successful checksum then reports failure and the install is aborted.Running the redirection in a subshell keeps that failure out of the caller. It also matters in zsh, which aborts the whole shell when its own diagnostic about the failed redirection cannot be written either.
Fixes #3906