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
Set npm_config_user_agent when running pnpx and pnpm create #3985
Comments
Thank you @cyco130 for raising this. |
@bestickley Heh, that's also me 😁 |
😆 well, thank you again! |
Not sure why it is not set when |
tauri users desiring to use pnpm could get a better dx when this is fixed. not exactly a game-changer but it's a rough edge affecting some external integrations which could help increase traction if fixed. |
damn that was quick work. nice job. 👌 |
Describe the user story
In
create-*
packages one often wants to install npm dependencies at the end of project initialization. But this requires determining the preferred package manager of the user. Most packages add a CLI option or prompt for this purpose. But the user has already expressed their choice buy runningnpm init
,yarn create
, orpnpm create
(orinit
, orpnpx create-*
etc.). We could determine the package manager choice if there was a way to determine the package manager that launched thecreate-*
script.Describe the solution you'd like
npm
andyarn
set thenpm_config_user_agent
environment variable under these circumstances butpnpm
doesn't. The problem would be solved if it did. The inconsistency with the other package managers even suggests that it may simply be a bug and not a missing feature.Describe the drawbacks of your solution
None I can think of.
Describe alternatives you've considered
There are no alternatives I can think of but asking the user explicitly for their package manager preference.
The text was updated successfully, but these errors were encountered: