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

fix: Use fs-extra instead of rimraf #883

Merged
merged 1 commit into from
Aug 2, 2021
Merged

fix: Use fs-extra instead of rimraf #883

merged 1 commit into from
Aug 2, 2021

Conversation

joachimvh
Copy link
Member

I have noticed an increase in CI tests failing since the amount of jobs double (due to testing both on push and on pull request). One error I have seen multiple times in such cases is rimraf failing to delete a folder after tests on Windows: https://github.com/solid/community-server/runs/3204484785?check_suite_focus=true#step:7:18

This PR changes rimraf to use the async call which might help, and even if it doesn't it's not a bad idea to use the async version.

@rubensworks
Copy link
Contributor

For reference, in case this would still fail in the future, remove() from fs-extra may also be a good alternative to try.

@joachimvh
Copy link
Member Author

For reference, in case this would still fail in the future, remove() from fs-extra may also be a good alternative to try.

Well one of the tests just failed on this PR so I'm going to give that one a shot instead.

@joachimvh
Copy link
Member Author

fs-extra didn't fail so it got lucky and is now the chosen library for this

@joachimvh joachimvh changed the title fix: Use async rimraf call fix: Use fs-extra instead of rimraf Aug 2, 2021
@joachimvh joachimvh merged commit 2a82c4f into main Aug 2, 2021
@joachimvh joachimvh deleted the fix/async-rimraf branch August 2, 2021 08:39
export function removeFolder(folder: string): void {
rimraf.sync(folder, { glob: false });
export async function removeFolder(folder: string): Promise<void> {
await remove(folder);
Copy link
Member

Choose a reason for hiding this comment

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

Or you could have re-exported that function 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Kept it like this just in case there is another issue only 1 place needs to change. 😄

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.

3 participants