mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-17 19:13:43 +00:00
Compare commits
4 Commits
a8fe1f0a0d
...
37be8728b8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
37be8728b8 | ||
![]() |
24deac7ac5 | ||
![]() |
cf9beb7f86 | ||
![]() |
9222739d18 |
12
README.md
12
README.md
@ -61,6 +61,8 @@
|
|||||||
- [macOS Troubleshooting](#macos-troubleshooting)
|
- [macOS Troubleshooting](#macos-troubleshooting)
|
||||||
- [WSL Troubleshooting](#wsl-troubleshooting)
|
- [WSL Troubleshooting](#wsl-troubleshooting)
|
||||||
- [Maintainers](#maintainers)
|
- [Maintainers](#maintainers)
|
||||||
|
- [Project Support](#project-support)
|
||||||
|
- [Enterprise Support](#enterprise-support)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
- [Copyright notice](#copyright-notice)
|
- [Copyright notice](#copyright-notice)
|
||||||
|
|
||||||
@ -1070,6 +1072,16 @@ You can check the contents of the file by running:
|
|||||||
|
|
||||||
Currently, the sole maintainer is [@ljharb](https://github.com/ljharb) - more maintainers are quite welcome, and we hope to add folks to the team over time. [Governance](./GOVERNANCE.md) will be re-evaluated as the project evolves.
|
Currently, the sole maintainer is [@ljharb](https://github.com/ljharb) - more maintainers are quite welcome, and we hope to add folks to the team over time. [Governance](./GOVERNANCE.md) will be re-evaluated as the project evolves.
|
||||||
|
|
||||||
|
## Project Support
|
||||||
|
|
||||||
|
Only the latest version (v0.39.7 at this time) is supported.
|
||||||
|
|
||||||
|
## Enterprise Support
|
||||||
|
|
||||||
|
If you are unable to update to the latest version of `nvm`, our [partners](https://openjsf.org/ecosystem-sustainability-program) provide commercial security fixes for all unsupported versions:
|
||||||
|
|
||||||
|
- [HeroDevs Never-Ending Support](https://www.herodevs.com/support?utm_source=OpenJS&utm_medium=Link&utm_campaign=nvm_openjs)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
See [LICENSE.md](./LICENSE.md).
|
See [LICENSE.md](./LICENSE.md).
|
||||||
|
6
nvm.sh
6
nvm.sh
@ -449,6 +449,12 @@ nvm_tree_contains_path() {
|
|||||||
previous_pathdir="${node_path}"
|
previous_pathdir="${node_path}"
|
||||||
local pathdir
|
local pathdir
|
||||||
pathdir=$(dirname "${previous_pathdir}")
|
pathdir=$(dirname "${previous_pathdir}")
|
||||||
|
|
||||||
|
# get real directory in case of symbolic links
|
||||||
|
if [ -d "${pathdir-}" ]; then
|
||||||
|
pathdir="$(nvm_cd -P "${pathdir}" && pwd)"
|
||||||
|
fi
|
||||||
|
|
||||||
while [ "${pathdir}" != '' ] && [ "${pathdir}" != '.' ] && [ "${pathdir}" != '/' ] &&
|
while [ "${pathdir}" != '' ] && [ "${pathdir}" != '.' ] && [ "${pathdir}" != '/' ] &&
|
||||||
[ "${pathdir}" != "${tree}" ] && [ "${pathdir}" != "${previous_pathdir}" ]; do
|
[ "${pathdir}" != "${tree}" ] && [ "${pathdir}" != "${previous_pathdir}" ]; do
|
||||||
previous_pathdir="${pathdir}"
|
previous_pathdir="${pathdir}"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cleanup () {
|
cleanup () {
|
||||||
|
rm tmp3/tmp2
|
||||||
|
rmdir tmp3
|
||||||
rm tmp/node
|
rm tmp/node
|
||||||
rmdir tmp
|
rmdir tmp
|
||||||
rm tmp2/node
|
rm tmp2/node
|
||||||
@ -14,6 +16,8 @@ mkdir -p tmp
|
|||||||
touch tmp/node
|
touch tmp/node
|
||||||
mkdir -p tmp2
|
mkdir -p tmp2
|
||||||
touch tmp2/node
|
touch tmp2/node
|
||||||
|
mkdir -p tmp3
|
||||||
|
ln -s tmp2 tmp3/
|
||||||
|
|
||||||
[ "$(nvm_tree_contains_path 2>&1)" = "both the tree and the node path are required" ] || die 'incorrect error message with no args'
|
[ "$(nvm_tree_contains_path 2>&1)" = "both the tree and the node path are required" ] || die 'incorrect error message with no args'
|
||||||
[ "$(nvm_tree_contains_path > /dev/null 2>&1 ; echo $?)" = "2" ] || die 'incorrect error code with no args'
|
[ "$(nvm_tree_contains_path > /dev/null 2>&1 ; echo $?)" = "2" ] || die 'incorrect error code with no args'
|
||||||
@ -28,4 +32,6 @@ nvm_tree_contains_path tmp2 tmp2/node || die '"tmp2" should contain "tmp2/node"'
|
|||||||
|
|
||||||
nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'
|
nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'
|
||||||
|
|
||||||
|
nvm_tree_contains_path tmp2 tmp3 && die 'no idea'
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user