Compare commits

...

3 Commits

Author SHA1 Message Date
Steven Dee (Jōshin)
73a6080234
Merge c1064550872bfc16afe02ec6edeb73ff3847a3da into 24deac7ac53a5b435ce592807ff015a9e788a1fa 2024-07-30 17:29:12 +00:00
Jordan Harband
24deac7ac5
[readme] add OpenJS Ecosystem Sustainability Program partner
- https://openjsf.org/ecosystem-sustainability-program
2024-07-30 10:08:48 -07:00
Jōshin
c106455087
[Fix] install.sh: install looks for .zshenv
A zsh user may have set `ZDOTDIR` to something other than `$HOME`, in which case the profile and rc files will not be located under `$HOME`. But unless the system `zshenv` has done something unusual, it is usually a safe bet that there will be a `$HOME/.zshenv` that, if nothing else, will be setting up `ZDOTDIR`.
2024-05-30 11:58:37 -07:00
2 changed files with 16 additions and 2 deletions

View File

@ -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).

View File

@ -40,7 +40,7 @@ nvm_profile_is_bash_or_zsh() {
local TEST_PROFILE local TEST_PROFILE
TEST_PROFILE="${1-}" TEST_PROFILE="${1-}"
case "${TEST_PROFILE-}" in case "${TEST_PROFILE-}" in
*"/.bashrc" | *"/.bash_profile" | *"/.zshrc" | *"/.zprofile") *"/.bashrc" | *"/.bash_profile" | *"/.zshenv" | *"/.zshrc" | *"/.zprofile")
return return
;; ;;
*) *)
@ -300,11 +300,13 @@ nvm_detect_profile() {
DETECTED_PROFILE="$HOME/.zshrc" DETECTED_PROFILE="$HOME/.zshrc"
elif [ -f "$HOME/.zprofile" ]; then elif [ -f "$HOME/.zprofile" ]; then
DETECTED_PROFILE="$HOME/.zprofile" DETECTED_PROFILE="$HOME/.zprofile"
elif [ -f "$HOME/.zshenv" ]; then
DETECTED_PROFILE="$HOME/.zshenv"
fi fi
fi fi
if [ -z "$DETECTED_PROFILE" ]; then if [ -z "$DETECTED_PROFILE" ]; then
for EACH_PROFILE in ".profile" ".bashrc" ".bash_profile" ".zprofile" ".zshrc" for EACH_PROFILE in ".profile" ".bashrc" ".bash_profile" ".zprofile" ".zshrc" ".zshenv"
do do
if DETECTED_PROFILE="$(nvm_try_profile "${HOME}/${EACH_PROFILE}")"; then if DETECTED_PROFILE="$(nvm_try_profile "${HOME}/${EACH_PROFILE}")"; then
break break