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

Adding --silent option for nvm use, and using it to disable processing certain output to speed up shell startup #780

Merged
merged 5 commits into from
Jul 18, 2015

Conversation

alanmquach
Copy link
Contributor

When sourcing nvm.sh, a considerable amount of time is spent running npm --version only for that output to be black-holed to /dev/null

…ng nvm.sh, a considerable amount of time is spent running npm --version only for that output to be black-holed to /dev/null
@ljharb
Copy link
Member

ljharb commented Jul 9, 2015

Interesting solution! I think I'd prefer a --silent command to nvm use rather than a global environment variable - I think that might be a bit cleaner than this approach. What do you think?

@alanmquach
Copy link
Contributor Author

I like that better. Definitely cleaner than the global. I'll see what I can whip up.

@alanmquach alanmquach changed the title Guarding npm version printing with NVM_SILENT flag check Adding --silent option for nvm use, and using it to disable processing certain output to speed up shell startup Jul 9, 2015
@ljharb
Copy link
Member

ljharb commented Jul 9, 2015

This is great - could you also add some test cases for this flag?

@ljharb ljharb added the feature requests I want a new feature in nvm! label Jul 9, 2015
@alanmquach
Copy link
Contributor Author

I added extra cases to the existing tests instead of creating a new file dedicated to "--silent"; felt more maintainable this way.

ljharb added a commit that referenced this pull request Jul 18, 2015
Adding --silent option for nvm use, and using it to disable processing certain output to speed up shell startup

Relates to #781.
@ljharb ljharb merged commit 60c2f37 into nvm-sh:master Jul 18, 2015
@ljharb
Copy link
Member

ljharb commented Jul 18, 2015

Thanks, merged!

@alanmquach
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature requests I want a new feature in nvm!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants