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

Implements "corepack elect" #26

Closed
wants to merge 1 commit into from
Closed

Implements "corepack elect" #26

wants to merge 1 commit into from

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Nov 23, 2020

See #25 and the documentation added to README.md for more details.

In short, this PR implements a proper way for projects such as create-react-app to detect which package manager to use when initializing a project, by gently asking the user only once for all installs that will occur on the machine.

Copy link
Member

@merceyz merceyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm -1 on this, I would prefer if packages check process.env.npm_config_user_agent to see which package manager was used and then do whatever they need to based on that.

@styfle
Copy link
Member

styfle commented May 19, 2023

I agree with merceyz.

For example, create-next-app documents these options for installation:

npx create-next-app@latest
yarn create next-app
pnpm create next-app

And then it uses process.env.npm_config_user_agent to determine which package manager was used.

@arcanis
Copy link
Contributor Author

arcanis commented May 20, 2023

Yeah, it's an old experiment, from prior those options were implemented. I don't plan to land it anymore.

@arcanis arcanis closed this May 20, 2023
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

Successfully merging this pull request may close these issues.

None yet

4 participants