[Fix] `nvm install`: do not remove the caller's `TMPDIR` after a failed download
Before adoption: this commit came in with the history the project adopted, so no landing records it.
`nvm_install_binary` and `nvm_install_source` declared `local TMPDIR` without initializing it, and remove it with `rm -rf` on failure. dash's `local` keeps the caller's value, as does bash's when `TMPDIR` is passed as a prefix assignment (`TMPDIR=… nvm install`), so a failed download removed the caller's temp directory; on macOS, `tar` instead blocked reading the archive from the terminal.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+38 added−0 removed
- tests:+30 added−0 removed
- other:+8 added−0 removed