-
Notifications
You must be signed in to change notification settings - Fork 189
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
How can I detect if corepack is already enabled? #113
Comments
Can you detail more the use case you have in mind? |
Basically this PR: Since corepack is changing global bins, we don't want to run |
You can detect whether you're running within a Corepack context by checking if That said, for your own use case, I wonder if perhaps the absolute no-risks option wouldn't be to just enable corepack in a temporary folder which you'd add to the |
Yeah that sounds good, how would I do that? 🙂 |
The corepack enable --install-directory="/tmp/random-directory" |
Thanks! The combination of |
If we were to programmatically enable corepack, we would want to disable after the work is complete.
However, if the user already had corepack enabled, then we wouldn't want to disable it.
Is there a way to get the current state to determine if its already enabled?
The text was updated successfully, but these errors were encountered: