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

use --silent not silent (enough) #3543

Open
nathanuphoff opened this issue Mar 11, 2025 · 3 comments
Open

use --silent not silent (enough) #3543

nathanuphoff opened this issue Mar 11, 2025 · 3 comments

Comments

@nathanuphoff
Copy link

nathanuphoff commented Mar 11, 2025

Operating system and version:

macOS 15.3.1

nvm debug output:

nvm --version: v0.39.1

nvm ls output:

    iojs-v2.5.0
      v12.22.12
       v14.19.0
       v16.13.2
       v16.14.2
       v16.15.0
        v17.4.0
       v18.12.1
       v18.16.1
        v20.9.0
       v20.10.0
        v21.5.0
        v22.6.0
->     v22.11.0
       v22.12.0
       v22.13.0
       v22.13.1
default -> 22.11.0 (-> v22.11.0)

How did you install nvm?

brew install nvm

What steps did you perform?

  1. ran nvm use --silent from a dir without a .nvmrc file.

What happened?

It outputted

Please see `nvm --help` or https://github.com/nvm-sh/nvm#nvmrc for more information.

What did you expect to happen?

It to output nothing (to be silent)

Is there anything in any of your profile files that modifies the PATH?

Yes not sure how that applies.

@ljharb
Copy link
Member

ljharb commented Mar 11, 2025

Do note that nvm is unsupported when installed via brew, as the formula informs you.

--silent isn't to suppress all output - you can do that yourself with 2>&1 >/dev/null - it's just to suppress non-error output.

@nathanuphoff
Copy link
Author

Got it, I fixed my use case (initialising nvm in a new session) by adding

if [ -f ".nvmrc" ]; then
  nvm use
fi

to my .zshrc, some flag to achieve the same might be nice to have.

@ljharb
Copy link
Member

ljharb commented Mar 15, 2025

usually one initializes nvm in a new session from the lines the install script puts in - it auto-uses. I suspect if you use the official install script, and not homebrew, you’ll have a better experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants