Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New] install.sh: add $ZDOTDIR to zsh search #3458

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

menaechmi
Copy link
Contributor

Install for zsh currently fails if you use $ZDOTDIR to change where the zsh files are located - see #3128. This is a simple way to make nvm find them first and then default to $HOME if unset. I tested it with $ZDOTDIR/.zprofile and $ZDOTDIR/.zshrc, as well as an unset $ZDOTDIR for both and it works.

I added a few tests for it, but I couldn't see if the tests actually worked right - all I get is Error: the install instructions explicitly say to pipe the install script to bash; please follow them. I wrote them to follow the existing structure.

After starting this, I did find #3365 (whoops) - I think this implementation is a little better by not relying on .zshenv (which can also be placed in the ZDOTDIR)

@ljharb ljharb added shell: zsh installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. labels Nov 8, 2024
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is great!

@ljharb ljharb changed the title [fix] add ZDOTDIR to zsh search [New] install.sh: add $ZDOTDIR to zsh search Nov 8, 2024
@ljharb ljharb merged commit cd22c84 into nvm-sh:master Nov 8, 2024
167 of 169 checks passed
@ljharb
Copy link
Member

ljharb commented Nov 8, 2024

hmm, one of the tests is failing on master, but it passed on the PR

ljharb pushed a commit to menaechmi/nvm that referenced this pull request Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. shell: zsh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants