-
Notifications
You must be signed in to change notification settings - Fork 171
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
Feature request: corepack exec #148
Comments
Can you give an example of what you might exec? Are you thinking something like Or are you thinking I'm not sure how this is different then #57 (comment) |
Issue #57 deals explicitly with Both examples you introduced My UC: I'm working on this Gradle plugin, that allows integrating a build of a Node.js-based project into a Gradle build. Actually, if the plugin needs to run a command of the selected package manager (I mean the one defined in the Does it make sense? |
Hi,
This feature request is not exactly the same than the one mentioned in #57. As introduced in the docs here, command
corepack <binary name>[@<version>] [... args]
allows to execute a package manager of our choice with custom arguments. This command checks whether the local project is configured for the given package manager.I personnally would be interested with a command such as
corepack exec [... args]
(exec
may not be the most relevant term however), that would take the exact release set in thepackageManager
property. I guess it is possible because in the command above, I assume corepack parses propertypackageManager
in thepackage.json
file to verify consistency with<binary name>
.Thus, I could run a command of the package manager whatever it is, and without repeating the binary name. This may be useful in writing plugins/extensions for build tools such as Maven, Gradle, acting as a bridge to launch npm/pnpm/yarn commands, without having to parse the
package.json
file and discover the package manager.Thanks in advance for your comments.
BR
The text was updated successfully, but these errors were encountered: