Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Install script: provide a nicer error if NVM cannot be added to the user's shell configuration due to permission issues #3788

@MaddyGuthridge

Description

@MaddyGuthridge

I teach a university course that uses NodeJS. We currently recommend nvm to our students for installing the correct Node version. Because these students are relative beginners at programming, any issues they encounter during the setup process are very difficult for them to diagnose and debug, and so good error messages are critically important. Of course, good error messages are helpful for all users, not just beginners.

In this case, a student's .zshrc file was owned by root rather than by their user. I believe this has something to do with them incorrectly installing some other development software (possibly Anaconda based on the contents of their .zshrc?). When this happened, the installation script from the readme reported an error saying that it could not write to the file. However, nvm's error message did not make the reasons for the issue clear. When this stage of the installation fails, it would be great if it could check the owner of the file, in order to provide helpful information about why adding it to the configuration failed. It would also be helpful to provide an example of the content that should be added to the .zshrc, so that users have the option to configure it themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pull request wantedThis is a great way to contribute! Help us out :-D

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions