-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
elaborate that npm help uses browser #2502
Conversation
As I mentioned in issue npm#2501 this is mildly annoying to me, and probably a few other people. I have added "(in a browser)" to the npm usage string at the npm help line.
At the very least we would want to make sure to indicate that this is only the default in windows. Not sure how to do that succinctly off the top of my head. |
@wraithgar maybe include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have this explained as part of npm help help
.
We can not land this as-is for the reasons @wraithgar just mentioned but maybe it's worth exploring the solution from @ljharb, I'm not 100% sure about having a conditional in usage messages but if that's feasible then it may even keep this (in a browser)
value in windows-only.
It might be very reasonable to display this on windows only! I like that idea, but (of course) that makes this a non-trivial change. What's the best way to do that? |
I believe that when this file is loaded the config is already loaded. You could gate the extra output behind a conditional that checks if viewer is set to browser. |
This approach has the benefit of matching "the current config", including if a user overrode it. |
As I mentioned in issue #2501 it is is mildly annoying to me that I forget that the npm help command opens a browser, and probably a few other people.
I have added "(in a browser)" to the npm usage string at the npm help line. Is this a reasonable change? It makes the output slightly more verbose, but reduces the occasional surprise of opening a browser with a saved session of over 900 tabs just to view a single help page. Yes, really, I do have 1004 tabs open currently, and that's an outlier, but I'm sure this impacts other people in less unusual circumstances.
References
Fixes #2501