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

add tip about nodenv permissions #365

Merged
merged 2 commits into from
Oct 14, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion contributing/node-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@ When updating to a new Node.js version, consider the following files:

If you're using macOS, run this command to get the latest:

```
```sh
brew upgrade nodenv node-build
```

If you see a warning like this one, run the suggested command:

```sh
# You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/sbin
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing that gave me pause was whether to replace $(whoami) with my username or just the whoami part. It might be worth calling out for people less familiar with the CLI.

Suggested change
sudo chown -R $(whoami) /usr/local/sbin
sudo chown -R USERNAME /usr/local/sbin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoami is actually a command on Unix systems. When you run it, it returns your username. The command suggested by the nodenv output will evaluate that on the fly, so sudo chown -R $(whoami) /usr/local/sbin becomes sudo chown -R leona /usr/local/sbin or similar.

```

If you're using another operating system, or did not use Homebrew to install nodenv, see these [upgrade instructions](https://github.com/nodenv/nodenv#installation).

To install Node.js 14 and make it your default version, run this command:
Expand Down