Skip to content

💚 Update old Corepack that throw ENOTEMPTY or EPERM errors#198

Merged
sounisi5011 merged 33 commits intomasterfrom
fix-ci/upgrade-broken-corepack
Mar 13, 2023
Merged

💚 Update old Corepack that throw ENOTEMPTY or EPERM errors#198
sounisi5011 merged 33 commits intomasterfrom
fix-ci/upgrade-broken-corepack

Conversation

@sounisi5011
Copy link
Copy Markdown
Owner

@sounisi5011 sounisi5011 commented Mar 12, 2023

Old Corepack throws ENOTEMPTY errors (or EPERM errors on Windows) when running package managers in parallel.
To fix this, update the old Corepack when it is detected.

Old Corepack throws ENOTEMPTY error when running package managers in parallel.
This has been fixed in Corepack v0.11, so if the old Corepack is detected, this will be updated.
The `mktemp` command on GitHub Actions seems to require the specification of the X's.
On Windows, the old Corepack seems to throw EPERM errors instead of ENOTEMPTY errors.
> ```yaml
> # Windows installs global packages to a directory that has lower priority than
> # the default node install so we also need to edit $PATH
> ```
> Source: https://github.com/vercel/turbo/pull/1632/files#diff-b92a3120126a9ffe46d7d5ec3a8496ef1eac951db09e1972fac7c78438e36c42R62-R63

> ```bash
> npm config get prefix >> $GITHUB_PATH
> ```
> Source: https://github.com/vercel/turbo/pull/1632/files#diff-b92a3120126a9ffe46d7d5ec3a8496ef1eac951db09e1972fac7c78438e36c42R69
@sounisi5011 sounisi5011 changed the title 💚 Upgrade a broken Corepack 💚 Update old Corepack that throw ENOTEMPTY or EPERM errors Mar 12, 2023
This step was added with #185.
However, perhaps if we run `npm config get prefix >> "${GITHUB_PATH}"`, we can update npm with the `npm install --global npm` command.
…eep 1` command

Waiting two seconds just to correct a display shift is a waste of time.
Note: The POSIX-compliant `sleep` command has a minimum of one second, so we use the `node` command instead.
@sounisi5011 sounisi5011 marked this pull request as ready for review March 13, 2023 02:34
github-actions[bot]
github-actions Bot previously approved these changes Mar 13, 2023
@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit c90bef5 and detected 0 issues on this pull request.

View more on Code Climate.

@sounisi5011 sounisi5011 merged commit a15e687 into master Mar 13, 2023
@sounisi5011 sounisi5011 deleted the fix-ci/upgrade-broken-corepack branch March 13, 2023 02:50
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.

1 participant