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

Can the pnpm setup command be run after installing pnpm? #216

Open
liby opened this issue Dec 28, 2022 · 3 comments
Open

Can the pnpm setup command be run after installing pnpm? #216

liby opened this issue Dec 28, 2022 · 3 comments

Comments

@liby
Copy link

liby commented Dec 28, 2022

Motivation

The pnpm setup command does the following actions:

  • creates a home directory for the pnpm CLI
  • adds the pnpm home directory to the PATH by updating the shell configuration file
  • copies the pnpm executable to the pnpm home directory

This command is used by the standalone installation scripts of pnpm. For instance, in https://get.pnpm.io/install.sh.

download_and_install() {
  ...
  chmod +x "$tmp_dir/pnpm"
  SHELL="$SHELL" "$tmp_dir/pnpm" setup || return 1
}

If a user is unaware that they need to manually run it after installing pnpm to properly set up environment variables, they may encounter issues such as errors in the VSCode ESLint extension.

@arcanis
Copy link
Contributor

arcanis commented Dec 28, 2022

That seems a little out of scope, since it'd perform uncontrolled changes outside of the folders Corepack is supposed to work with. It would also be difficult to make it work once corepack enable isn't explicitly needed.

@liby
Copy link
Author

liby commented Dec 28, 2022

That seems a little out of scope, since it'd perform uncontrolled changes outside of the folders Corepack is supposed to work with. It would also be difficult to make it work once corepack enable isn't explicitly needed.

Hmm, I understand. How about a reminder in the form of a prompt message?

@shellscape
Copy link

That seems a little out of scope

It's contextually out of scope by default. But it's absolutely not out of scope for most users of PNPM (hey there, I'm a core contributor to pnpm) who use corepack within CI environments and/or container environments.

This would be useful as an optional executor.

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

No branches or pull requests

3 participants