-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow pnpm env use without the global flag #9364
Description
Contribution
- I'd be willing to implement this feature (contributing guide)
Describe the user story
As developer who works in multiple projects at once, i want to set the used node version only locally in the current terminal session, or if it is a pnpm project, for the current directory, to prevent needing to switch the node version all of the time as soon as i need to switch the project.
Describe the solution you'd like
Currently, the pnpm env use command can only be used with the --global flag. If the flag is left out, the following message appears: ERR_PNPM_NOT_IMPLEMENTED_YET "pnpm env use <version>" can only be used with the "--global" option currently
As discussed in https://github.com/orgs/pnpm/discussions/3434#discussioncomment-12674336, if the current working directory of the command is a pnpm project, the useNodeVersion option in the pnpm-workspace.yaml property should be updated to represent the used node version. If the cwd isn't a pnpm project, the desired node version should just be used for the currently active terminal session.
Describe the drawbacks of your solution
No response
Describe alternatives you've considered
No response